Pathmaker Reference Manual
3 Macro Language
067869 Tandem Computers Incorporated 3–1
The Pathmaker product generates requester, server, and service source code using
code skeletons, or templates, written in a macro language that is available for you to
use. You can use the macro language for a range of functions, including copying
repeated text, generating lengthy blocks of code, and even customizing the Pathmaker
skeletons. You define macros in an edit file and register them as objects in a
Pathmaker project catalog, thereby supporting code sharing.
This section describes the components of the macro language and gives the syntax for
the six macro commands. For more details on macro language application, see the
Pathmaker Programming Guide. For a sample macro, see Appendix B, “Macro
Language,”.
The section is presented in two parts as follows:
“Macro Language Components” describes the elements of the macro language:
command lines and source code lines, variables and parameters, and comments.
“Macro Definition and Commands” gives the syntax for defining and coding a
macro.
Macro Language
Components
The macro language includes source lines, command lines, and descriptive comments.
You can define variables to be referenced in the source lines and parameters to be
passed to the source lines. In addition, Tandem provides a set of special-purpose,
predefined variables, called constructs, that you can use with Pathmaker to increase
programming productivity.
These components of the macro language are described in the following paragraphs.
Source Lines and
Command Lines
A macro file contains two kinds of code: source lines and command lines. Source lines
are the lines to be copied to the target source file. Command lines control the
processing of the source lines.
Command lines always begin with a percent sign (%). All other lines are source lines.
An ampersand (&) at the end of a command line indicates a continuation. Thus, when
a command line ends in &, the next line must be a command line also. (The
continuation line also begins with %.)
The macro language is not case sensitive. The case of all commands, variables, and
labels is ignored.
Comments You can include descriptive comments by preceding them with an exclamation
point (!). All text following an ! and up to the end of the line or another ! is not parsed.
Because a second ! ends the comment text, comments can be embedded in a command
line.
Also, the & holds its meaning within comment text. That is, an & indicates the
continuation of a command line embedded in comment text. The line following a line
ending in & must also be a command line.