PS TEXT FORMAT Reference Manual
Examples of Function and Macro Constructs
G-8 11387 Tandem Computers Incorporated
MACRO Example 2 This example prints a line of bullets from margin to margin. You can use
this to delineate features (say in a program) by sandwiching text between
such lines. In this macro, named dots, the TFORM system variable
SYS_linewidth is used to calculate the width between the left and right
margins:
\MACRO dots DELETE
\MACRO dots BEGIN LOCAL dotted_line
\ASSIGN dotted line ""
\ LOOP SYS_linewidth/WIDTH("*")
\ ASSIGN dotted_line dotted_line&"*"
\ ENDLOOP
\(dotted_line\)
\ENDMACRO dots
\ !
The following input file uses the dots macro to tell TFORM where to insert
the result of the dots macro.
\dots
This simplex macro disables left/right alternation
of headers and footers, for printing single-sided
draft copies.
\dots
\IMACRO simplex BEGIN LOCAL rtside
\ IF ARG(0)<1
\ ASSIGN rtside 1
\ EXITMACRO
\ ENDIF
\ IF UPPER(ARG(1,1))="ON"
\ ASSIGN rtside 1
\ ELSE
\ ASSIGN rtside 0
\ ENDIF
\ENDMACRO simplex