Declares a symbol for use in a DataBasic program.
$DEFINE symbol {value}
symbol An identifier to be used as a symbol.
value Any valid DataBasic expression.
$DEFINE can be used in two ways:
When used in this way, $DEFINE is similar to the EQUATE statement, except that value extends to the end of the line.
A symbol defined with $DEFINE can be undefined with the $UNDEFINE statement. It can then be defined again with $DEFINE. Note, however, the following restrictions:
Refer to the EQUATE statement for more information about defining a symbol to be equivalent to a DataBasic expression.
EQUATE statement, $IFDEF statement, $IFNDEF statement, $UNDEFINE statement.
$DEFINE PI 3.1416
Declares symbol PI to be equal to 3.1416.
$DEFINE PART.NO ITEM(3)
Equates PART.NO to array element number 3 of ITEM.
$DEFINE TODAY DATE() 'DJ'
Equates symbol TODAY to the current date, formatted as the Julian day (1-365 or 1-366 for a leap year).
$DEFINE DEBUG
Defines the symbol DEBUG. This can then be used with $IFDEF and $IFNDEF statements to include or exclude code from the compiled version.