(
(
c
c
[lJ
[2]
1:3]
[4·]
I::~:;
]
[6]
[7]
[8J
[9]
[10]
[11.]
[12]
[:1.3]
(14-]
[:I.5J
[:1.6]
Y
I
W
I
R
G
N
T
Atomic Vector:
DAV
The
atomic
vector
is
a 256-element vector
that
includes all possible APL charac-
ters. The following example shows it can be used
to
determine
the
indices
of
any
known characters in
the
vector (assuming 010
is
1):
DAY,
'ABC'
87 88
89
Appendix C contains a list
of
the
characters in
the
atomic
vector. The most com-
mon use
of
the
atomic vector
is
for
generating line feed and cursor return charac-
ters
to
arrange
output.
The following example shows
how
the
atomic vector can
be used
to
generate these characters.
The function called NAMES will display
your
first and last name. Each name will
start
at
the
left margin and each character
in
the
name will be
one
line lower
than
the
previous character:
'VNAMES[D]V
V A
NAMES
B;OUTPUT;I;J;OIO
[]IOi-:l.
'V
I
,Jf'(
~),
f.O+Ii"('>, A
ASTATEMENT
5
CATENATES
THE
ARGUMENTS
TOGETHER
RAND
ALSO
PUTS
A
BLANK
CHARACTER
BETWEEN
EACH
CHARACTER
OUTPUT~«2xJ)p
1
O)\(,A),(,B)
ASTATEMENT
8
PLACES
A
LINE
FEED
CHARACTER
(OAV[160])
AIN
EACH
BL~NK
ELEMENT
OF
OUTPUT
OUTPUT[2X\j-l]~DAV[160]
ASTATEMENT
11
PLACES
A
CURSOR
RETURN
CHARACTER
(DAVE157])
AAFTER
THE
FIRST
NAME
OUTPUT[2XI]~OAV[157J
ANOW
WHEN
THE
CHARACTER
VECTOR
Q~!PY!
IS
DISPLAYED,
AAPL
RESPONDS
WITH
THE
APPROPRIATE
ACTION
WHEN
A
LINE
AFEED
CHARACTER
(OAV[160])
OR
CURSOR
RETURN
CHARACTER
A(OAV[157J) IS
ENCOUNTERED
IN
THE
CHARACTER
STRING
OUTPUT
'VIRGINIA'
NAMES
'WINTER'
N
'1
A
E
R
127