This command-line compiler option enables/disables checking for undefined values.
Syntax: -u[+|-]
Default: Enabled
Notes: When this option is enabled the compiler generates code which checks each time your program gets a value from a variable to make sure that the value is not undefined. If your program does get an undefined value from a variable then the code generated by the compiler will issue a run-time error message and terminate your program.
So for example if you compile and run the following program
program bad(output);
var
r : real;
begin
writeln(r) (* The value of "r" is undefined *)
end.
The program will terminate with a run-time error message because of the attempt to print the value of r which is undefined. Unfortunately not all variable accesses can be checked, checks are only made for accesses to variables of the following types:
Checking for undefined values is performed as follows: