A compile time variable is de ned like this:
{$SETC ident:= expression}
|
The expression is a so-called compile time expression, which is evaluated once, at the point where the f$SETC g directve is encountered in the source. The resulting value is then assigned to the compile time variable.
A second f$SETC g directive for the same variable overwrites the previous value.
Contrary to macros and symbols, compile time variables de ned in the Interface part of a unit are exported. This means their value will be available in units which uses the unit in which the variable is de ned. This requires that both units are compiled in macpas mode.
The big di erence between macros and compile time variables is that the former is a pure text substitution mechanism (much like in C), where the latter resemble normal programming language variables, but they are available to the compiler only.
In mode MacPas, compile time variables are always enabled.