TAL Reference Manual

Compiler Directives
TAL Reference Manual526371-001
16-29
DEFINETOG Directive
DEFINETOG Directive
DEFINETOG specifies named or numeric toggles, without changing any prior settings,
for use in conditional compilation. DEFINETOG is a D20 or later feature.
toggle-name
is a user-defined name that conforms to the TAL identifier format.
toggle-number
is an unsigned decimal constant in the range 1 through 15. Leading zeros are
ignored.
Usage Considerations
DEFINETOG can appear anywhere in the source code but not in the compilation
command. DEFINETOG without a parenthesized list must be the last directive on the
line. When DEFINETOG has a parenthesized list, other directives can follow on the
same line, with a comma separating the closing parenthesis from the next directive.
DEFINETOG interacts with the IF, IFNOT, and ENDIF directives. IF and IFNOT test the
setting of toggles and mark the beginning of conditional compilation. ENDIF marks the
end of conditional compilation.
Named Toggles
Before you use a named toggle in an IF or IFNOT directive, you must specify that
name in a DEFINETOG, SETTOG, or RESETTOG directive. Which of these directives
VST1615.vsd
,
DEFINELOG
toggle-name
toggle-number
,
toggle-name
toggle-number
( )