pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

Names are case-insensitive (For example, abc is the same as Abc.)
toggle-number
is an unsigned decimal constant in the range 1 through 15. Leading zeros are ignored.
target
is as defined in “TARGET” (page 516).
PTAL
is a toggle implicitly defined and set by the TAL, pTAL and EpTAL compilers. It is set on if the
compiler in use is any pTAL or EpTAL compiler, otherwise it is set off. See “DEFINETOG”
(page 388).
__EXT64
is a toggle implicitly defined and set by the EpTAL compiler starting with SPR T0561H01^AAP.
It is set on if the corresponding “__EXT64” (page 394) directive has been specified otherwise,
it is set off. The __EXT64 directive controls the availability of 64-bit addressing functionality;
see “DEFINETOG” (page 388) and Appendix E, “64-bit Addressing Functionality” (page 531).
The most recently compiled IF or IFNOT matches the next compiled ENDIF with the same toggle
or target specified identifies the beginning of code to be conditionally compiled.
Example 346 IF Directive Without Matching ENDIF Directive
?RESETTOG flag ! Create & turn off flag
?IF flag
! Statements for true condition
! (skipped because flag is off)
?IFNOT flag
! Statements for false condition
! (also skipped, because no ENDIF appears for IF flag)
?ENDIF flag
If you insert an ENDIF for the IF in the code in Example 346 (page 399), as in Example 347
(page 399), the compiler skips only the first part.
Example 347 IF Directive With Matching ENDIF Directive
?RESETTOG flag ! Create & turn off flag
?IF flag
! Statements for true condition
! (skipped because flag is off)
?ENDIF flag ! ENDIF stops the skipping of statements
?IFNOT flag
! Statements for false condition
! (compiled because ENDIF appears for IF flag)
?ENDIF flag
NoneDefault:
Placement:
Anywhere in the source file (not in the compilation command)
Must be the last directive on the directive line
Everything between IF or IFNOT and the next ENDIF that specifies the same
toggle, target, or keyword
Scope:
Interacts with:Dependencies:
DEFINETOG
ENDIF
__EXT64
RESETTOG
IF and IFNOT 399