TGAL Manual
IF Command
TGAL Commands
2–26 060865 Tandem Computers Incorporated
IF Command Use the IF command to enable conditional printing of text. With this command, you
define the condition that must be met before TGAL can print parts of the text. Use the
SET command to control these conditions. If the SET command corresponding to the
IF command is not present, TGAL ignores all text and commands that follow until the
next IF command. The condition is met or set with a toggle, which can only be ON or
OFF. You can use any number from 1 through 10 as a toggle.
The syntax of the IF command is:
IF
toggle number
ON
OFF
toggle number
is any number from 1 through 10.
ON
means a corresponding SET ON command with the same toggle number must be
executed so that the lines which follow the toggle can be printed.
OFF
means a corresponding SET OFF command with the same toggle number must be
executed so that the lines which follow the toggle can be printed. TGAL assumes
all toggles are OFF until explicitly set ON.
Considerations
Usually you use the IF command in the EDIT file and the SET command when you
run TGAL.
You can use two IF commands to mark the text that is to be printed conditionally.
The first IF command uses a toggle number to mark the beginning of the text; the
second IF command has no options and tells TGAL to continue processing text.
The IF command suppresses the NEED command.
If you do not use this command, TGAL assumes:
IF 1 OFF
IF 2 OFF
.
.
.
IF 10 OFF