Description

Use to initialize a constant to an expression.

Syntax

Equate symbol To expression

Equ symbol To expression

Parameters

The Equate statement has the following parameters.

ParameterDescription
symbolDuring compilation, every occurrence of symbol in the program will be replaced with the expression. Though symbol is treated as the equivalent of the expression, it is not allocated storage in memory.
expressionAny legal BASIC+ expression.

Only one Equate statement may appear on a line; to differentiate constants (equates) from variables, equated symbol names are usually suffixed with an "$". If a set of equates is used in more than one location, put the equates into an insert record. This allows the equates to be maintained in a single record and you can use Impact Analysis to monitor changes.

Example

Equ  TRUE$ To 1
Equ  FALSE$ To 0
 
MYVAR = TRUE$;* compiles as "MYVAR = 1"
MYVAR = FALSE$;* compiles as "MYVAR = 0"
  • No labels