17.4 Controlling Compilation
BASIC lets you control the compilation of a program by cre-
ating and testing lexical constants. You create and assign
values to lexical constants with the %LET directive. These
constants are always LONG integers.
You control the compilation by using the %IF-%THEN-
%ELSE-%END %IF directive to test these lexical constants.
Thus, you can conditionally:
.
Supply different values for program variables and con-
stants
.
Skip over part of a program
.
Abort a compilation
.
Include BASIC source code from another file
.
Display informational messages during the compilation
BASIC also supplies the lexical built-in function %VARIANT
that can be used to conditionally control compilation.
%IF-%THEN-%ELSE-%END %IF uses lexical expressions
to determine whether to execute directives in the %THEN
clause or the %ELSE clause. The following sections describe
the use of:
.
Lexical constants and expressions (%LET directive)
.
%VARIANT
.
%ABORT
.
%PRINT
.
%IF-%THEN-%ELSE-%END %IF