EasyManuals Logo

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 #95 background imageLoading...
Page #95 background image
(
(
c
Dyadic (Two-Argument) Form: Rotate A
<1>
[I]
Bar
A<1>B
or
AsB
The rotate function rotates the elements
of
argument B the number
of
positions
specified by argument
A.
If
argument A
is
positive, then the elements
of
argument B are rotated
to
the left (rows), or upward (columns). If A
is
negative,
the
elements are rotated
to
the
right (rows), or downward (columns). Argument B
can be any expression. The shape
of
the
result
is
the same as
that
of
argument
B.
When argument B
is
a multidimensional array, the index entry
[I]
can be used
to
specify the coordinate
that
is
acted on. If the index entry
is
omitted, the last co-
ordinate (column)
is
acted on. If the
AsB
form
is
used,
then
the first coordinate
is
acted on.
If
argument B
is
a vector, then argument A must be a scalar
or
single-element array.
If argument-B
is
a matrix, then argument A must be a scalar
or
vector. When
argument A
is
a vector, the number
of
elements
in
argument A must be
the
same
as
the
number
of
elements
in
the coordinate being rotated. For example, if B
is
a 3
by 4 matrix (each row has four elements) and
the
row coordinate
is
specified, A
must have four elements:
2<1>:1.
2 3
5..--
3 4 5
5
'!2:1
2 3
I.J.
5
(2--1~
4-
5
:I.
2 3
3
'7(~:I.
2 3
I.~
5
31+~5:1.2
B~3
4-p
1 2 3
~
5 6
'7
8 9
10
11
:1.2
B
:I.
2
:5
56'7
9
:1.0
:1.1
1
()
52'7
9 6
1.1
1.
10
3
o
:I.
:I.
2
:3
6
"7
B
11
:1.2
9
o
:I.
:I.
2 3
6
"7
B
:1.:1.
12
9
:t.
0
527
9
6:1.1
1 10 3
A~"~"1
f~
-1.
()
"':1.
-2
i
The first coordinate (rows)
is
specified;
1+
therefore, the rotation
is
between rows.
8
~:
2$r.1JB
r:: r 1
[:2
~
J
lOJJ
2<1>[2:1B
I.~
\
!7j
'-------The
second coordinate (columns)
is
specified;
:1.0
2<J)B
therefore, the rotation
is
between columns.
L~'
5
'------The
last coordinate
is
acted on.
:1.0
1
2eB
12
LI·
\"-----The
first coordinate
is
acted on.
S
01.2
9
:I.
A(~[1]B
2 1.l B
3
12
'7
L~
6
5
1.
0
91

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
Release Year1975
RAM16 KB - 64 KB
Storage204 KB tape drive
Display5-inch CRT
Operating SystemAPL/BASIC
ProcessorIBM PALM (1.9 MHz)

Related product manuals