pTAL Reference Manual (H06.08+)
Compiler Directives
HP pTAL Reference Manual—523746-006
17-7
Examples
Example 17-3. DEFINETOG, IF, and ENDIF Directives
?DEFINETOG scanner ! Define toggle
...
?IF scanner ! Test toggle for on state
PROC skipped; ! Find it off, skip procedure
BEGIN
...
END;
?ENDIF scanner ! End of skipped procedure
Example 17-4. DEFINETOG, IFNOT, and ENDIF Directives Directive
?DEFINETOG emitter ! Define toggle
...
?IFNOT emitter ! Test toggle for off state
PROC kept; ! Find it off, compile procedure
BEGIN
...
END;
?ENDIF emitter ! End of compiled procedure
Example 17-5. SETTOG, IF, and ENDIF Directives
?SETTOG keep ! Create & turn on toggle
...
?IF keep ! Test toggle for on state
PROC kept; ! Find it on, compile procedure
BEGIN
...
END;
?ENDIF keep ! End of compiled procedure
Example 17-6. SETTOG, IFNOT, and ENDIF Directives
?SETTOG (done, nested) ! Create & turn on toggles
?IFNOT done ! Test toggle for off state
PROC skipped; ! Find it on, skip procedure
BEGIN
...
END;
?ENDIF done ! End of skipped procedure










