EasyManuals Logo
Home>IBM>Laptop>5100

IBM 5100 Apl Reference Manual

IBM 5100
228 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #79 background imageLoading...
Page #79 background image
(~
('
('
Note:
The
mixed functions
reverse,
rotate,
compress,
and
expand,
and
the
operators
(see
Operators
later
in
this chapter) reduction and
scan
can be applied
to
a specific
coordinate
of
an array. This
is
done
by
using an index
entry
[I] which indicates
the
coordinate
to
which
the
mixed
function
or
operator
is
applied.
The
value
of
the
index
entry
can be
from
1
to
the
number
of
coordinates
in
the
array;
the
leftmost
coordinate
(first coordinate) has an index value
of
1,
the
next
coordinate
has an
index value
of
2, and so on. A matrix, for example, has an index value
of
.1
for
the
row
coordinate
and an index value
of
2 for
the
column
coordinate.
If an index
entry
is
not
specified,
the
last
coordinate
(columns)
is
assumed. If a - (minus) symbol
is
overstruck with
the
function
symbol
or
operator
symbol,
the
first
coordinate
is
assumed (unless an index value was also used). When a
function
or
operator
is
ap-
plied
to
a specific coordinate,
the
operation
takes
place
between
corresponding ele-
ments
in
the
specified
coordinate.
For
example; assume
you
have a 3-rank array:
When
the
first coordinate (planes)
is
specified, the
operation
takes
place
between
corresponding elements
in
each plane.
When
the
second
coordinate
(rows)
is
specified,
the
operation
takes place between
the
corresponding elements
in
each row per plane.
When
the
third
coordinate
(columns)
is
specified,
the
operation
takes
place be-
tween
the
corresponding elements
in
each column
per
plane.
The p Function:
Shape,
Reshape
(Structure)
Monadic (One-Argument) Form:
Shape
p B
The
shape
function
result
is
the
shape
of
the
argument; it has
one
element
for each
coordinate
of
the
argument, which indicates
the
length
of
that
coordinate.
The
argument
can be any variable
or
constant:
(J ABeD ·
....
1-------
A Vector with
Four
Elements
1+
(,J
:l
"'1
A-
••
2
pl.
2 3
~3
A~"2
A
1
2
3
l~
\J
6
pA
2
3
The
shape
function
applied
to
a scalar yields an
empty
vector, since a scalar has no
coordinates. An
empty
vector
is
indicated
by
a blank result line:
p2
Blank Result Lines
p'T'~
75

Table of Contents

Other manuals for IBM 5100

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM 5100 and is the answer not in the manual?

IBM 5100 Specifications

General IconGeneral
BrandIBM
Model5100
CategoryLaptop
LanguageEnglish

Related product manuals