[next] [prev] [prev-tail] [tail] [up]

#### $I or $INCLUDE : Include compiler info

In this form:

     {$INCLUDE %xxx%}

where xxx is one of the following:

DATE
  Inserts the current date.
FPCTARGET
  Inserts the target CPU name. (deprecated, use FPCTARGETCPU)
FPCTARGETCPU
  Inserts the target CPU name.
FPCTARGETOS
  Inserts the target OS name.
FPCVERSION
  Current compiler version number.
FILE
  Filename in which the directive is found.
LINE
  Linenumer on which the directive is found.
TIME
  Current time.

If xxx is none of the above, then it is assumed to be the name of an environment variable. Its value will be fetched. As a reult, this will generate a macro with the value of these things, 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

[next] [prev] [prev-tail] [front] [up]