$DEFINE Compiler Directive |
![]() ![]() ![]() |
The $DEFINE directive is used to associate a value with a symbolic name at compile time. The standard include records in the SYSCOM file contain many examples of $DEFINE.
The format of a $DEFINE directive is
$DEFINE name value
where name is the symbol to be used in the program and value is a constant.
The token QM is automatically defined and may be used to determine whether a program is being compiled on the QM database. The token QM.WINDOWS, QM.LINUX, QM.FREEBSD, QMMAC or QMPDA is defined corresponding to the underlying operating system. Because these are only relevant at compile time, take care when using them in programs that may be moved between platforms. The SYSTEM(1010) function can be used to determine platform type at run time.
See also: |