Compile time: the time at which the source code is converted into an executed code. (when the program is compiled)
Runtime: the time at which teh executable code is started running. (when the program executes)
Compile-time errors:
- syntax error: not follow the syntax of the programming language
- semantic error: the statements are not meaningful to the compiler
Runtime errors:
- errors that occur during the execution (and after compilation)
- the compiler does not detect the error, so it cannot prevent the code from the execution
- such as: division by zero / the square root of a negative number
Compiler Tasks:
- Check program statements for erros and report them.
- Generate the machine instructions that carry out operations specified by then program.
(Declarations / Executable statements / Housekeeping)