In this form:
{$INCLUDE %XXX%}
|
the {$INCLUDE} directive inserts a string constant in the source code.
Here XXX can be one of the following:
If XXX is none of the above, then it is assumed to be the name of an environment variable. Its value will be fetched from the environment, if it exists, otherwise an empty string is inserted. As a result, this will generate a macro with the value of the XXX specifier, as if it were a string.
For example, the following program
Program InfoDemo;
Const User = {$I %USER%}; begin Write (’This program was compiled at ’,{$I %TIME%}); Writeln (’ on ’,{$I %DATE%}); Writeln (’By ’,User); Writeln (’Compiler version: ’,{$I %FPCVERSION%}); Writeln (’Target CPU: ’,{$I %FPCTARGET%}); end. |
Creates the following output:
This program was compiled at 17:40:18 on 1998/09/09
By michael Compiler version: 0.99.7 Target CPU: i386 |