Specifications
4-17
Printer, Plotter, and Spooler Subsystem Programming
Internal Variables:
Internal variables a through z are integer variables for use by %P, %Z, and %g. They are
initialized to zero and their values change only if a %P or %Z changes them. There are two
independent sets of these variables: one set is used by the piobe command for building
pipelines, while the other set is used exclusively by a formatter. The values for a formatter’s
set are maintained for the duration of the formatter’s processing.
%P[a–z] Pops an integer value from the stack and stores it in the specified
internal variable. For example, %Pf moves an integer value from
the stack to variable f.
%Z[a–z] Zeroes the specified internal variable. For example, %Zg stores a
value of 0 in variable g.
%g[a–z] Pushes the value of the specified internal variable onto the stack.
The value of the internal variable is not changed. For example,
%gb reads the integer value in variable b and pushes it onto the
stack.
Arithmetic Operators:
%+ %– %* %/ %m Pushes the result onto the stack.
%+ Adds the first two values popped off the stack. For example,
%{5}%{6}%+ pushes a value of 11 onto the stack.
%– Subtracts the first value popped off the stack from the second
value popped off the stack. For example, %{12}%{3}%– pushes a
value of 9 onto the stack.
%* Multiplies the first two values popped off the stack. For example,
%{2}%{3}%* pushes a value of 6 onto the stack.
%/ Divides the first value popped off the stack into the second value
popped off the stack. For example, %{6}%{2}%/ pushes a value of
3 onto the stack.
%m (modulus) Similar to %/, except that the remainder, instead of the
quotient, is pushed onto the stack. For example, %{17}%{9}%m
pushes a value of 8 onto the stack.
Note: The first value to be popped off the stack is the last one to be pushed onto the
stack, and the second value to be popped off the stack is the one that was pushed onto
the stack first.