User`s guide

4-151
Printer, Plotter, and Spooler Subsystem Programming
The Calculation of Page Width figure depicts the stacks operations (as described above)
used to obtain a final numeric value for page width in characters. The following numbered
steps correspond to the numbers on the left side of the columns in the figure, and provide a
step–by–step description of the evaluation of the printer colon file escape sequences
defining page width, in characters, for this particular queue (asc), colon file, and command
line.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
37
36
38
wW _w wK wQ Wu
%Cw0
%I_w
%G_z
1
%{1}
1
%t
%GwK
%G_Q
%GWu
%GwQ
%CO
%t
0
%G_u
1
%d
1
%{0}
0
%=
0
%t
%GWu
1
%{1}
1
%=
1
%t
%Gs1
1
%d
1
%Pq
%GWu1
%{3}3
%<
1
%t
%gq
1
%{1}
1
%=1
%t
%{3200}
3200
%d
3200
%G_p
12
128
Calculation of Page Width
%&
1
39
%{17}17
%=
0
%G_p
12
%{10}
%*
10
120
%*
%t
384000
%G_w
0
%t
%{3000}
3000
%/
128
%d
40
41
42
43
44
45
46
47
1. %Cw – Pushes a 0 onto the stack since the w flag was not used on the command line.
2. %I_w – Calls for the evaluation of _w.
3. %G_z – Pushes a 1 onto the stack.
4. %{1} – Pushes a 1 onto the stack.
5. %& – Pops the top two values (two 1s) off the stack, performs a bitwise AND on the two
values, and pushes the resultant 1 onto the stack.
6. %t – Pops the 1 off the stack and, since it is a TRUE (non–zero) value, calls for the
evaluation of %GwK.
7. %GwK – Calls for the evaluation of wK.
8. %G_Q – Calls for the evaluation of _Q.
9. %GwQ – Calls for the evaluation of wQ.
10.%GWu – Calls for the evaluation of Wu.