PS TEXT FORMAT Reference Manual
Introduction to TFORM
3–102 11387 Tandem Computers Incorporated
Macro Invocation
Command
You use a macro invocation command to start execution of a macro and to
pass arguments to it.
What to Enter
\
macro-name
[
exp1
[ [
exp2
] ... [ [
exp
(
n
) ] ] ] ]
How to Use the Macro Invocation Command
Within the body of the macro, you can use the ARG(
exp
) function
(described in Section 5) to access the value, or the text, of each argument
you pass to it. ARG(0) gives the number of arguments passed in the current
invocation. (Trying to access an argument beyond the last one causes a
“VALUE OUT OF RANGE” error.) The number of arguments you can pass
is limited only by the length of an edit line (255 characters). Refer to
Appendix G for an example of a macro and its invocation command.
Whenever TFORM encounters a trigger character followed by a name, it
searches for a command, a user macro, or a system macro with that name.
If it finds none, it looks in the subvolume in use at the time you started
TFORM for a file called TFORMLIB. If that file doesn’t exist, it accesses
$SYSTEM.SYSTEM.TFORMLIB. If TFORM can’t find the macro at all, it
issues a “command error” message.
$SYSTEM.SYSTEM.TFORMLIB contains the TFORM-supplied system
macros (such as LEVEL, LIST, and TODAY). If you want, you can build
your own macro library file named TFORMLIB in the subvolume you work
in when creating document files that use the system macros. If you want to
use the system macros, you must either include a copy of
$SYSTEM.SYSTEM.TFORMLIB in your own TFORMLIB, or your
TFORMLIB must source in the system TFORMLIB.
If you copy $SYSTEM.SYSTEM.TFORMLIB to your filed named
TFORMLIB, you can customize the system macros in any way you wish.
However, if you change the macros in your TFORMLIB, you should not
also source in $SYSTEM.SYSTEM.TFORMLIB. TFORM will give an error if
it tries to define the second occurrence of the macro.