Difference between revisions of "compile-time error"
From Lazarus wiki
Jump to navigationJump to search (Created page with "{{compile-time error}} Compile-time error, which means the program did not compile. The compiler found and reported an error during Compile_time|co...") |
|||
Line 6: | Line 6: | ||
* Missed [[;|semicolons]] - A fairly common coding error is the omission of the required semicolons. Usually every [[Pascal]] [[statement]] ends with a semicolon | * Missed [[;|semicolons]] - A fairly common coding error is the omission of the required semicolons. Usually every [[Pascal]] [[statement]] ends with a semicolon | ||
+ | |||
+ | == Own compile time error == | ||
+ | The [[Compiler directive|compiler directive]] <syntaxhighlight lang="pascal" inline> | ||
+ | {$Fatal Error Message text} </syntaxhighlight> can be done | ||
+ | own compile time error | ||
+ | |||
+ | <syntaxhighlight lang="pascal"> | ||
+ | begin | ||
+ | // some code .. | ||
+ | |||
+ | // To keep the compilation going | ||
+ | // you need to change the code at this point | ||
+ | |||
+ | {$Fatal Error Message text} | ||
+ | |||
+ | // .. here is the code that is not compiled | ||
+ | // because the compilation stopped in error | ||
+ | end. | ||
+ | </syntaxhighlight> | ||
== See also == | == See also == | ||
* [[runtime error|run-time error]] | * [[runtime error|run-time error]] |
Revision as of 11:30, 27 October 2019
│
English (en) │
suomi (fi) │
Compile-time error, which means the program did not compile. The compiler found and reported an error during compile time.
Fairly common compile time errors
- Missed semicolons - A fairly common coding error is the omission of the required semicolons. Usually every Pascal statement ends with a semicolon
Own compile time error
The compiler directive {$Fatal Error Message text}
can be done
own compile time error
begin
// some code ..
// To keep the compilation going
// you need to change the code at this point
{$Fatal Error Message text}
// .. here is the code that is not compiled
// because the compilation stopped in error
end.