User`s guide
4-146
Guide to Printers and Printing
• s1 – paper size for tray 1 (upper)
• s2 – paper size for tray 2 (lower)
• s3 – envelope size for envelope feeder
• s4 – envelope size for manual envelope size
In the virtual printer definition for an ASCII queue on an IBM 4029 LaserPrinter, there are
only two unique values for these five attributes: s0, s1, and s2 are all 1, while s3 and s4 are
both 3.
Looking back up the nested escape sequences, you can see that the definition of wJ is
composed of an outer if–then–else statement. Both the if and the else pieces of this
statement contain a chain of if–then–else–then–else... statements. The value of Wu (which
is a value for paper source, based on O and u) determines whether the if or the else piece
of the outer statment executes; if Wu is 1 or 2 (less than 3), then the if piece executes;
otherwise the else piece executes. It is in the final determination of wJ that the page length,
in pels, is fixed.
The if piece of the outer if–then–else statement defining wJ selects a pel value from a range
of non–envelope paper sizes; the else piece of the outer if–then–else statement selects a
pel value from a range of envelope paper sizes. Wu controls which piece of the if–then–else
statement executes but, once either the if or else piece has been chosen, it is the value of Q
that causes a pel value to be selected. The five cases listed above work like this:
Case 1: Either the command line value of u or the default from the colon file (1, primary
paper tray) is returned to the evaluation of wQ. The remaining escape sequences in the
definiton of wQ test the value of Wu and select the value of one of s0, s1, s2, s3, or s4.
That value is in turn returned to the evaluation of wJ. If u is 1 or 2 , then Q will be 1
(non–envelope paper size). If u is 3, then Q will be 3 (envelope paper size). When the
evaluation of wJ is resumed, a u value of 1 or 2 will direct the process into the if piece of the
outer if–then–else statement, and the Q value of 1 will select a page length of 2400 pels. A
u value of 3 will direct the process into the else piece of the outer if–then–else statement,
and the Q value of 3 will select an envelope page length of 1087 pels.
Case 2: Same as case 1.
Case 3: The user–specified manual paper handling on the command line but did not specify
a paper source so Wu is assigned the value 0, and that value is returned to the evaluation
of wQ. The 0 will cause wQ to be assigned the value of s0 (the paper size for manual paper
feed, a 1). When the evaluation of wJ is resumed, the u value of 0 will direct the process
into the if piece of the outer if–then–else statement, and the Q value of 1 (s0) will select a
page length of 2400 pels.
Case 4: The user specified manual paper handling on the command line and also used the
u flag to specify either the primary or alternate paper source (but definitely not envelopes).
As with case 3, a page length of 2400 pels will be chosen.
Case 5: The user–specified manual paper handling on the command line and also used the
u flag to specify an envelope paper source so Wu is assigned the value 4, and that value is
returned to the evaluation of wQ. The 4 will cause wQ to be assigned the value of s4 (the
envelope size for manual envelope size, a 3). When the evaluation of wJ is resumed, the u
value of 4 will direct the process into the else piece of the outer if–then–else statement, and
the Q value of 3 will select an envelope length of 1087 pels.
Our example is case 1: neither the O nor the u flags were used on the command line, so
Wu is assigned a value of 1, the default _u value for this colon file. When the evaluation of
wQ resumes, the match occurs on s1, and a 1 is returned to the evaluation of wJ. The u
value of 1 direct the process into the if piece of the outer if–then–else statement, and the Q
value of 1 selects a page length of 2400 pels. This value is returned to the evaluation of _l.
The remaining printer colon file escape sequences defining _l reason that if there are 2400
pels available (vertically), and if we want six lines per inch, and if there are 300 pels per inch
(the resolution of the printer), then 48 lines can be printed on a page. The value 48 is
returned to the evaluation of ia. That’s basically where the –l48 in the PIPELINE OF
FILTERS came from.