pTAL Reference Manual (H06.08+)
Compiler Directives
HP pTAL Reference Manual—523746-006
17-41
IF and IFNOT
pTAL
identifies the beginning of code that is to be compiled by the pTAL or EpTAL
compiler but not by the TAL compiler:
If you insert an ENDIF for the IF in the code in Example 17-21 on page 17-41, as in
Example 17-22 on page 17-42, the compiler skips only the first part.
Compiler IF pTAL IFNOT pTAL
pTAL or EpTAL True False
TAL False True
Default: None
Placement:
•
Anywhere in the source file (not in the compilation command)
•
Must be the last directive on the directive line
Scope: Everything between IF or IFNOT and the next ENDIF that specifies the
same toggle, target, or keyword
Dependencies: Interacts with:
•
ENDIF
•
DEFINETOG
•
SETTOG
•
RESETTOG
•
TARGET
See Toggles
on page 17-5.
References:
•
DEFINETOG on page 17-27
•
ENDIF on page 17-29
•
RESETTOG on page 17-54
•
SETTOG on page 17-58
•
TARGET on page 17-68
Example 17-21. 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










