The following examples show how the
"If
function can be used to
control spacing and precision of numeric data (see the IBM 5110 APL
Reference Manual, SA21-9303, for a complete description of
the
"If.
function):
B
~
.. ::5 2
p
:1. 2 • :' 5 1.f· ... :3
Lj .•
~:}
b "1 0 :I. 2 .... 2
b'"
:I. 2:-5 .
I.J.
~.:j
B
:I.
;.~
, 3LJ·
o
... (I ,
::.~6
· .... .l\L
1::' ' / ' ' ' 1 ]
\.. I . '" (;)
f
12
~.--Numeric
Value of B
... :I.
2~'5
,
I·I·~:.:;
/
,...----'----- Spacing of Nine Positions for Each Number
",
Each number should contain two decimal places
r;
21'B
1,2,3
1
+
,00
···.26
... 3lf· ,
~;7
:1.2.0 ()
... :I. 2:3 ;
l~!;:.i
- - - - Formatted Character Result
..
Spacing and Precision for the First Column
,
( .
~SpaCing
and Precision for the Second Column
I.)
A' ..
. ;
.I.fl
• <. :
' 0
~
;.; : II.
-.4------Formatted Character Result
'1/')
"~I
..
··71
.6J
.... 26
...
1.
~.:.~:.3
•
' +
I
N1ine Positions
Six positions
You can use the
Dee
(console control) system function to specify a
tab position from the left margin. The printed output then starts from
that tab position. To specify the tab positiof), the left argument of the
Dee
function is 5 and the right argument specifies the tab position.
For example:
'PRINTED
p
I~
I NTED
OUT PUT
OUTPUT'
~:.i
[ICC 20
20 character positions
/
The explicit result of
the DCC function.
:I.
'Pt~INTED
OUTPUT'
PRINTED OUTPUT
Printer Control
97