PS TEXT FORMAT Reference Manual

Introduction to TFORM
3–4 11387 Tandem Computers Incorporated
Programmatic Commands You can use programmatic commands to create program-like constructs for
performing conditional, repetitive, or parameter-driven processing.
Programmatic commands are a little different than the other commands.
They cannot be abbreviated like the previous types of commands, and they
cannot be combined with other commands (except with COMMENT); each
must be on a line by itself.
FUNCTION together form parameter-driven constructs,
RETURN which are similar to the macro constructs.
ENDFUNCTION You can invoke a function during formatting
to define an expression, which then becomes
the value of the function at the point at
which it is called.
IF together form conditional-processing
ORIF constructs that let you select one path from
ELSE several alternative processing paths, based
ENDIF on some condition you specify.
LOOP together form repetitive-processing constructs
NEXTLOOP that let you perform a sequence of operations
EXITLOOP a specified, computed, or derived number
ENDLOOP of times.
MACRO together form parameter-driven constructs,
EXITMACRO resembling subroutines, that you can invoke
ENDMACRO during formatting to do specialized operations.
There are also commands to delete macros and
to append lines to them.