IBM 5100 Apl Reference Manual

Page 1
---
----
- -
---
-
---
- - ---
- --
-----
--_
---
.-
----
-..,,------
~-~-
-
~
-
·r
lAN
M.
ENGEL
DEC -119
7T
o o
IBM
APL
5100
Reference Manual
Page 2
Preface
This publication specific Portable Computer, the planning and procedures. about forms insertion and ribbon replacement
5103 printer. This publication
the 5100
information
and
is
a reference manual
about the
APL
the
APL
language.
that
provides
use
of
the IBM 5100
language, and installation
It
also provides
is
intended
information
for
Prerequisite Publication
IBM
5100 APL Introduction, SA21-9212
Related Publications
IBM
5100
APL Reference Card, GX21-9214
APL
Language, GC26-3847
for users
the
of
"
o
Third Edition (May
This
is a major
Newsletter
Changes have been made
Requests or
the
A
form gone, address Rochester,
©International
SN21-0258.
for
IBM
branch
for
readers'
MN
revision
of,
copies
of I BM
office
comments
your
comments
55901.
Business Machines
1976)
and obsoletes,
throughout,
publications
serving
your
is
at
to I BM
Corporation
the
so
this
should
locality.
the
back
Corporation,
previous
manual
be made
of
this
1975,
edition
SA21-9213-1
should
be reviewed
to
your
publication.
Publications,
1976
and
Technical
in
its
entirety.
I BM representative
If
the
form
Dept
is
245,
o
o
o
Page 3
Contents
CHAPTER
IBM Display Screen Switches.
Power On or Restart Procedures Display Screen
Keyboard
Attention Hold Execute Command Positioning the Cursor and
Copy Display
I
ndicator
-,
I The
\l
i
t
-(
Process In
CHAPTER
System Overview System Command Descriptions
The The The )COPY The )DROP Command .
The) The) The)
The The The) The )PATCH Command The) The The The )Sf Command The The The The )WSI D Command
CHAPTER Variables.
Data Representation
Numbers. Scaled Representation (Scientific Character Constants
Logical Data
Scalar. Arrays 32
Generating Arrays
Finding the Shape Empty
Catenation Indexing .
1.
5100
Display Screen
OPERATION
Portable
Lights . 8 The /\
Process
)CLEAR )CONTINUE
)ERASE
F NS Command
LI B Command
LOA )MARK )MODE
OUTSE L Command
PCOPY Command )REWIND )SAVE
)SIV )SYMBOLS )V
ARS
Arrays
Computer
Control
Check
2. SYSTEM
Command
Command
Command.
Command
D Command
Command.
Command.
Command
Command
Command
Command
Command
3.
DATA
of
Overview Primitive Scalar Functions .
.
Information
COMMANDS
An
Array
on the
Notation)
.
2 2 2 3
5 6 6 6 6
6 8
8 9
10 10 10 13 13 14 15 15 16
16 18 18 20 20 21 25 26 26 27 27 28 28 29
30 30 30 30 31 31 32 32
33 35 36 37 39
CHAPTER
Primitive Mixed
APL
Special Symbols .
4.
PRIMITIVE
+
Function:
The
Function:
The ­The x
Function:
The
-;-
Function:
r
Function:
The
L
Function:
The
I
Function:.
The
*
Function:
The The
~
Function:
The
0
Function:
The!
Function:
The?
Function:
Function:
Function:
The V The'"
Function:
The
AFunction:
The
VFunction:
The>
Function:
=
Function:
The
<
Function:
The
~
Function:
The The::;
Function:
~
Function:
The The p
Function:
The,
Function:
The /
Function:
Function:
The \
~
Function:
The
The 'f
Function:
"fhe t
Function:
The +
Function:
The 1
Function:
The ¢
Function:
The
~
Function:
The?
Function:
The
1.
Function:
The T
Function: Function:
The E The
[E
Function:
The
.t
Function:
The ~ Function:
Operators
Reduction Operator
I nner Product Operator ( • ) Outer Product Operator ( 0 Scan
Operator
Assignment
Arrow
Branch
Quad
D
Quad Quote
Comment R
Parentheses ( )
Conjugate, Negation, Minus Signum, Times
Reciprocal, Divide .
Ceiling, Floor, Magnitude, Residue 52
Exponential, Power
Natural Log, Pi
Factorial, Binomial Roll
And Or Not Nand. Nor Greater Than 67 Equal
Less
Greater Than
Less
Not
Functions.
Shape, Reshape (Structure)
Rpvel, Catenate, Laminate Compress
Expand. Grade Grade
Take.
Drop. Index Reverse, Rotate
Transpose, Generalized Transpose
Deal
Decode
Encode (Representation) Membership.
Matrix Execute
Format
(\
)
Arrow
-)-
[!]
(BUILT-IN)
Plus.
Maximum.
Minimum
Times, Circular
To
Than
Than
or
Equal
(I)
Equal
To
Up Down'
Generator, Index
(Base
Inverse,
.)
+
FUNCTIONS.
Logarithm
or
Equal
To
Value)
Matrix
To
.
of
Divide
43 43 44 45 46 48 49 51
54
55 56 59 61 62 63 64 65 66
68 69 70 71 72 73 75
77
81 82 83 84 86 87 88 89 93 95 96
99 104 105
107
108 111 111 113 116 118 120
120. 121 121 122 122 122
I I
I
f
iii
Page 4
I
I
CHAPTER
FUNCTIONS
System Variables
System
CHAPTER
Mechanics
Interactive
Arranging
Locked Function
Trace and
5.
SYSTEM
Comparison Index Printing Print Random
Line
Workspace Available: 0
Latent
Atomic
The The 0 FX The 0 EX The The 0 NC
Function Branching and Labels Loc"!l and
Requesting
Execution
Bare
Displaying Revising a User-Defined Reopening An
Example
Trace Stop
Tolerance: 0 CT
Origin:
010
Precision: 0
Width: 0 PW
Link:
Counter: 0 LC
Expression: 0
Vector: 0 AV
Functions
0 CR
Function: Function: Function:
0 N L
Function: Function:
6.
USER-DEFINED
of
Function
Header.
Global
Functions
Keyboard
.
the
Output
Output
Functions
.
Editing
a User-Defined
Function
of
Stop
Controls
Control
Contro
I 154
VARIABLES
.
.
PP
.
0 R L
WA
LX
.
Canonical Representation Fix
. Expunge Name
List
Name Classification
FUNCTIONS
Definition
Names
Input
during
from
a User-Defined
.
Function
Function
Definition
Function
Editing
AND
SYSTEM
Function
Function
123
123 124 125 125 126 126 126 126 126
127
128 128 129 132 132 133
134
134 135 137 139 144
145 146 146
147
148 148 148 150 151
152
152
CHAPTER
THE
Data
5100
Tape Data Cartridge
CHAPTER How How
Thickness
How
CHAPTER
APPENDIX Environment
5100
Auxiliary Printer
APPENDIX
OVERSTRUCK
APPENDIX
APPENDIX
IBM
GLOSSARY
INDEX
9.
MORE
5100
Security
Storage Capacity
Storage Considerations
10.
I nsert
Forms
Adjust
Replace a
11.
A.
Procedure .
Tape
Setup
Procedure
B.
C.
D.
THE
the
ERROR
SETUP
Unit
APL
CHARACTERS
ATOMIC
5100
to
to
to
Setup
APLSV
THINGS
Handling
5103
PRINTER
Copy
Control
Ribbon
.
MESSAGES
PROCEDURES
Setup
Procedure
CHARACTER
VECTOR
APL
COMPATIBI
TO
KNOW
and Care
Dial
SET
for
ABOUT
Forms
AND
LlTY
171 171
172
173 175
176
177
179 179
182
191
191
192
197
199
201
202
WITH
206
210
215
CHAPTER Suspension State I nd
CHAPTER
OUTPUT
Establishing a Opening a Data Transferring
Closing a Data Retracting Return An
iv
7.
SUSPENDED
icator
.
8.
TAPE
Variable
File
Data 163
Transferring
Operation) Transferring Transferring
Codes 166
Example
Data
. 163
Data
Data
File
or
the
Variable
Using Tape and
FUNCTION
AND
PRINTER
to
be Shared .
or
Specifying
to
Tape
from to
the
Terminating
Name Being Shared .
Printer
(OUT
or
Tape (I N
Printer
(PRT
the
Printer I nputlOutput
EXECUTION
INPUT
AND
Output
ADD
Operation)
Operation)
Printer
Output
155 155 155
158
158
159
164 164
165
165
167
Page 5
(
\BNI
5100 pORi
ihe
5100 \ f
board. a
,V
to the s,/stem w'" perform.
fe.tures
munications adapter.
.w
mon\tors'.,-~eh~'ed,/,sbP~:;ds~~:~;:ches
pe
the user.
....
,
p.BLE
igur~t
I"
,I.b
CONlPUiER
1
~t::e~rt~~~c:;\~~:~'
un."
"
for the 5100 are
le
d
O\lER\I\EIN
ind",cator
an
amdliarv
ih
5100 has a
e
.nd
an
adapter for
lights communicate informat,on
alloW
the user
t.pe
unit. • printer
displaV
to
control the operations
blOCk
••
screen.
KeV"
and
W~
ite
nd •
COm"
(
..
C
switches
\ndica
9
tOr
tl
Lights
~
switches Adapter for
\Nh
,'!
ite
I
SlacK
MonitorS
,ape
unit
and
'\
Page 6
DISPLAY
Th~
display screen (Figure 2)
up
to
64
output
as
0)
of
the (flashing be displayed. If
ter,
the
input,
all lines
the
two
moved
SWITCHES
The
switches
restarting
SCREEN
characters
(processed
display
horizontal
flashing line
of
bottom
off
of
the
the
on
system,
lines again.
can
in
each
I ine.
information)
contain
the
the
display screen.
the
information
line) indicates
cursor
is
is
replaced
display are moyed
The
5100
console
and
controlling
display
moved
by
top
161ines
Input
(information
is
displayed.
entered
where
the
to a position
the
flashing
up
so
lines
of
(Figure 3) are used
how
of
information
The
from
the
next
input
that
character.
that
information
the
display
information
supplied
bottom
keyboard.
from
already
As
are lost as
for
turning
is
displayed.
at a time,
by
the
two
lines (lines 1
The
the
keyboard
contains
the
5100
can
be
the
power
with
user) as well
cursor
will
a charac-
processes
entered
on
lines are
on,
/ "
and
Power On
The starting
Lme
~
15 14
13
12
11 10
9
8
7
5
4 3
2 5
o
or
Restart Procedures
following
switches
the
system
Numbers
...
.......
1-------64
3+2
_
-4-
~
are used
operation.
I
nput
Output Cursor
when
from
the
(flashing
character
turning
keyboard
horizontal
positions
power
line)
---------1.,.
on
to
the
system
or
re-
Normally, board of
the
Figure 2. The
2
to
distinguish
is
indented
display screen.
5100
and
Display Screen
input
output
from
is
displayed
output,
starting
input
from
at
the
the
left
key-
edge
Page 7
BASIC/APL
(
Only dual-language machines have this switch. The switch setting determines which
language will be pressed. is
pressed,
Power
ON/OFF
When this switch system performs internal checks and becomes ready switch
is
Note:
The
this message
RESTART switch
RESTART
This switch restarts internal checks and becomes ready displayed when after
20
seconds, press RESTART again. If
after
several
in
operation
If
the
switch setting
the
language in
is
in
put
in
the
OF F position, no power
message CLEAR
is
not
displayed
is
discussed next).
the
the
system
attempts,
when power
is
changed
operation
the
ON position, power
WS
is
displayed when
after
20
system
call
operation.
in
is
ready. If
your
service representative.
is
turned
after
power
will
not
be changed.
is
supplied
is
supplied
seconds, restart
When it
15-20 seconds.
the
system does
the
system does
on
or
after
RESTART
is
turned
on
or
after
to
the
system. The
in
15-20 seconds. When
to
the
system.
the
system becomes ready. If
the
is
pressed,
The
system
not
operation
the
system performs
message CLEAR
display
not
the
become ready
is
RESTART
the
(the
WS
message
is
c
The primary uses malfunction has occurred language machines.
Note: Any
will be lost when RESTART
of
this switch are
information
and
you
to
to
change
had stored is
pressed.
restart
the
in
Display Screen Control
The following switches are used screen
is
displayed.
L32
64
R32
This three-position switch (positions 64, L32, and R32)
• 64 - Characters are displayed can be shown
• L32 - Characters are displayed the
left
• R32 - Characters are displayed the
right
32
characters
32
characters
on
each line.
of
to
control
in
adjacent positions,
in
alternate positions (blanks between);
the
64-character lines are shown.
in
alternate positions (blanks between); only
of
the
64-character lines are shown.
the
system
language
the
active workspace (see
how
the
operation
in
operation
information
operates
and
up
to
after
a system
on
dual-
Chapter
on
the
display
as follows:
64
characters
2)
only
3
Page 8
~
tE'
"
r::::
~
Sol
-f
::s-
eD
~
8
n
0
~
~
CD
BRIGHTNESS
0
BASIC
~~~~~~G!£J(RENUM]~(REWIND](CalcRes~~~
APL
(l
LOAD)~~CIQ!JCI.:§D(lVARS)~~(lOUTSELHREWIND)~
L3264
R32
D
PROCESS
POWER
ON
D
POWER
OFF
IN
PROCESS
©
©
CHECK
COpy
DISPLAY
REVERSE
DISPLAY
D
[DELETE}(INSERT)
BASIC
D D
APL
RESTART
DISPLAY
D
NORMAL
REGISTERS
OGJCDCDGJCDCDmCJCJOCD
••
fI)(IJ(I)COCDCOOJCOwCDQO
CD
OJ
CD
Q (]]
CD
CD.GJ
rn
coO]
(]]
GJCDGJQCDCDCIJOOOJCD
( )
J
'I
Shift
Key
Alphameric Keys
Shift Key
888 GJ88
OCJGJ
( 0
aa
)0
Numeric Keys
_
G G
0
[:]
I"
'-
Page 9
(
REVERSE
This switch on control
DISPLAY
determines
a dark background
may have
to
whether
or
be adjusted when
dark
the
display screen will display light characters
characters
on
a light
the
switch setting
background.
is
changed.
The brightness
DISPLAY
REGISTERS
This switch
Note: When
KEYBOARD
The
5100
keys are grouped
When
the
of
the
bottom
held,
the keys can be used tered
using symbols (+ - be entered using keys
The
keyboard performed of
the
APL language
chapter
(Chapter
is
for
the
service representative's use
you
use
your
keyboard
keys are pressed,
upper
the
by a typewriter.
(Figure 3) has alphameric and
together
two
lines)
symbol
numeric keys
-;-
x) located
contains
to
4)
on
enter
to
some keys
symbols
of
this
when
5100,
this switch must be in
numeric
and
are similar
the
characters entered
on
the
display screen.
the
key pressed
numbers; however, numbers can
on
the
on
the
top
the
right
of
that
These keys are discussed in
on
the
manual.
to
is
right side
row
of
the
numeric keys.
perform
keyboard
those
on a typewriter
appear
If
either
entered.
of
the
keyboard.
the
alphameric
operations
are discussed in
servicing
The
the
your
the
NORMAL position.
keys.
The
keyboard.
in
the
input
shift
key
is
top
row
of
be
conveniently en-
The
keyboard
in
addition
following text. Uses
the
APL language
5100.
alphameric
line (one
pressed
alphameric
arithmetic
can also
to
those
and
c
Attention.
Pressing ATTN
everything
Pressing ATTN during system start
Output displayed because causes
When ATTN outside a user-defined possible. Also, indicates where
operation
the
execution
that
the
(attention)
from
the
at
of
was being generated before
there
output
and
is
pressed twice during
the
message INTERRUPT,
the
statement
when
cursor
to
the
execution
the
end
of
a user-defined
is
a delay
the
actual display
function),
was
entering information
end
of
the
between
the
interrupted
of
line o .
any
expression
statement
function,
the
of
the
execution
execution
the
or
currently
enter
-+-0
system
the
the
operation
execution
output.
of a statement
of
that statement, are displayed.
from
the
keyboard
user-defined
being processed.
LC.
stopped
of
the
statement
(either inside
statement
stops
and a caret
function
To
may
as
soon
(A)
that
erases
stops
re-
not
that
or as
be
5
Page 10
Hold
When pressed once, HOLD causes all processing allows processing
the
display rapidly. When key
is
active.
to
resume.
information
the
hold
during
is
in
The
an
effect
primary output
Notes:
1.
Holding service personnel.
2. When
keys (+ - service personnel.
the
down
hold
-;-
x)
the
is
on
CMD
in
the
effect
key
and
(HOLD pressed once),
right side
of
Execute
When
this
key
is
processed
by
the
pressed, system. This
the
input
key
to
purpose
operation,
(HOLD pressed
pressing HOLD
the
keyboard
line
of
information
must
be pressed
stop;
when
of
HOLD
when
the
once),
only
is
restricted
the
use
of
are restricted
on
the
for
any
input
pressed again,
is
to
permit
display
is
changing
the
COpy
to
use
by
the
arithmetic
to
use
by
display screen
to
be processed.
it
reading
DISPLAY
the
is
Command
When
this
key
is
pressed and held, pressing an alphameric key in
causes
the
APL
command
in
the
input
line.
The
)FNS, )VARS, )COPY, )WSID, )OUTSEL,
Note: Holding
service personnel.
down
Positioning the Cursor and
The
following keys are used
screen:
Forward Space
this
the
is
key
held
is
pressed
down,
last position
on
the
When this
key reaches first position
keyword
command
the
CMD
Information
to
once,
the
cursor
on
other
input
one
or
keywords
key
and
position
the
cursor
continues
input
line.
character
pressing HOLD
above
that
key
are: ) LOAD, )SAVE, )CONT,
and
)REWIND.
is
restricted
on the Display Screen
the
cursor
and
information
moves
one
position
to
move
to
the
right. When
line (line 1
or
0),
it
wraps
to
to
the
the
around
top
be
entered.
to
use
on
the
right. When
row
)LlB,~
by
the
display
the
cursor
to
the
6
Page 11
Insert
(
('
When
the
CMD characters to
the
The cursor does
Before the insert operation:
After
When these keys are
right and blank characters
Note: If
not
Backspace
right
work.
at
one
the
there
key
is
held
down
and
the
and
to
the
right
of
the
cursor position (flashing character) are moved position, and a blank character not
insert
is
a character
move.
operation:
both
For
example:
/ Flashing character
123V
123_567
held
down,
the
continue
in
position
to
forward space key
is
inserted
characters
be inserted.
64
of
line 0,
at
continue
the
insert
is
pressed once,
the
cursor position.
to
move
operation
to
the
the
will
When this key
it
is
held position 1 the
other
Delete
When
the
character
to
the
right are moved over
cursor
is
Before the delete operation:
After
When these keys are tinue
to
is
pressed once,
down,
the
cursor
on
one
input
input
line.
CMD
key
is
held
at
the
cursor position (flashing character)
not
moved. For example:
the
delete operation:
both
be deleted and all
the
cursor moves one position
continues
line (line 1
down
one
to
or
and
the
position
move
to
0), it wraps
backspace key
to
the
left
the left. When
around
is
deleted and
to
close
12344~
r--------.::::.
123456
held
down,
the
the
characters
characters
to
the
at
the
right are moved
to
the
left. When
the
cursor reaches
to
the
last position on
is
pressed once,
all
characters
up
the
space.
Flash
ing
character
cursor position con-
to
the
left.
the
The
!I,IIIt,
(
./
7
Page 12
Scroll Up •
This key (located above When
this
key
the
lines are moved
As
this
When
Scroll Down
This key (located above When
As screen. When
key
the
key
the
lines are moved
Copy Display
If
there
is a 5103
once,
all
the DISPLAY key
Note:
is
has been pressed
The
is
pressed
is
held
down,
is
pressed
this
key
CD
Printer,
information
operational
L32
64
R32 switch has
the
once,
up,
the
the
once, down, is
held
when
presently
even
once).
numeric
top
the
numeric
the down,
when
keys) can be used
each displayed line
line
is
lost as it
lines
continue
keys)
each displayed line
bottom
the
line
the
lines
CMD key
on
the
the
system
no
effect
is
moved
is
moved
to
move up.
can
be
used
is
moved
is
lost as it
continue
is
display screen
on
held
is
what
in
to
down
the
will be
only
off
only
is
moved
move
and
is
hold
in
execution
up
to
the
the
display screen.
in
execution
to
the
next
off
down.
this
key
printed.
state
printed.
next
the
COpy
(the
mode.
line.
mode.
lower line.
display
is
pressed
HOLD
INDICATOR LIGHTS
The
5100
console (Figure 3) has
Process
Check
When
on,
press
the
tion
cannot
sentative.
this light indicates
REST
ART
be
successfully restarted
switch
the
following
that a system
to
restart
the
after
indicator
malfunction
system
several
operation.
attempts,
lights:
has
occurred.
call
If
the
your
system
In this case,
opera-
service repre-
8
Page 13
(
(
In
Process
When
the
IN
PROCESS light
put
and
flashing
Notes:
1.
For
some expressions generated cases, even goes
off
when
the
has
completed
2.
If
the
display screen
IN
PROCESS light
your
service representative.
system
before
though
and
system
is
processing
is
on.
cursor
th~
the
the
output
has finished processing
execution).
is
is
off,
input,
After
are displayed,
or
user-defined
expression
system
is
displayed.
blank (no
check
generally
the
input
and
functions
or
function
is
still processing
The
data
or
the
brightness
the
is
processed,
the
system
has
flashing
the
input
cursor
control
display screen
the
light goes
waits
for
(see
Chapter
completed
data,
the
cursor
(the
expression
is
present)
and
before calling
is
blank
off,
input.
5),
output
execution.
IN
PROCESS light
is
again displayed
or
the
and
the
the
out-
is
I n such
function
(/
"""":
(
-"-'
.......
-'
c
9
Page 14
Chapter 2. System Commands
SYSTEM OVERVIEW
The
5100
contains an active workspace, which
the
user's data
is
turned active workspace saved
on
for
use
at contents tape.
The
tape
use. Before a
one
or
more files where tains information for a description
The
system
the
system,
and
off
or
tape
(stored workspace) and
a later
of
the
is
your
tape
commands, which are used are discussed next.
is
the
part
of
internal storage where
user-defined functions (programs) are stored. When
the
RESTART switch
is
lost. However,
time
(see System Command Descriptions
active workspace
library;
about
of
that
can be used,
data
can be stored. Each file has a file header, which con-
the
file. See
the
file header.
is,
is
the
~ontents
then
then
exist in
it
is
a place where
it
must be
the)
to
pressed
LI
on
the
5100,
of
the
active workspace can be
read back into
both
formatted. A formatted
B system
control
and
the
in
the
active workspace and
you
can store
command
provide information
this chapter).
the
power
all
the
data
in
the
active workspace
The
on
data
for later
tape
contains
in this
chapter
about
SYSTEM COMMAND DESCRIPTIONS
The
information
described
Commands
Command
)CLEAR
)COPY
)ERASE
)LOAD
)PCOPY
)SYMBOLS
)WSID
following list shows
about
in
detail later
that
Control
how
system
the
various parts
in
this chapter.
the
Active Workspace
Meaning
Clear
the
active workspace.
Copy
stored
Erase global objects (see note 1) from
Replace
Copy stored objects (see
tect
Change
Change
the
objects
the
the
commands
of
objects (see
active workspace with a stored workspace.
in
the
number
active workspace 10.
are used
the
system. Each system
note
note
active workspace from being destroyed.
of symbols allowed
1) into
1) into
to
control and provide
command
the
active workspace.
the
active workspace.
the
active workspace and pro-
in
the
active workspace.
is
10
Page 15
Commands
that
Control
the
Library (Tape)
(
(
{,'
Command
)CONTINUE
)DROP
)MARK
)SAVE
Commands
Command
)FNS
)LlB
)SI
)SIV
that
Provide I
Meaning
Write
the
workspace
Drop a tape
Format
Write
the
workspace
nformation
Meaning
Display
Display
Display
Display
contents
can
contain
file.
the
tape.
contents
cannot
About
the
names
workspace
the
state
the
state
of
the
active
suspended
of
the
active
contain
the
System
of
the
user-defined
file headers.
indicator.
indicator
workspace
functions.
workspace
suspended
and
local names.
on
on
functions.
functions.
tape.
tape.
The
The
active
active
(
Other
)SYMBOLS
)VARS
)WSID
Commands
Command
)MODE
)OUTSEL
)PATCH
)REWIND
Notes:
1.
Objects
2.
The
system
)REWIND,
they
are used.
that
refers
commands
and
Display
workspace.
Display
Display
Control
Meaning
Place
Select
Apply data
Rewind
to
both
)SAVE will
the
number
the
names
the
active
the
System
the
5100
printer
IMFs (internal
after a tape
the
tape.
user-defined
)CONTINUE, )COPY, )PCOPY,
blank
of
symbols
of
the
workspace
in
communications
output.
machine
error.
functions
the
top 8 or
allowed
global variables.
10.
fix)
and
variables.
9 lines
mode.
to
the
)DROP,
on
the
and
used in
system
or
)LOAD,
display screen
the
active
recover
)MARK,
when
c
11
Page 16
All
system
a
right
parenthesis. Each
meters separated and cussed in
(required
cannot
commands
by
blanks.
be
used as
Chapter
or
optional
6).
(and
system
System
part
only
system
command
information)
commands
of a function
commands)
must
begin
for
the
cannot
be
definition
have as
system
used
(function
their
first
on
a new line. Para-
commands
within
APL
definition
character
must
be
instructions
is
dis-
System
1.
2.
The
any
used as
• Device/file
commands
The
system
keyboard.
The
system )WSID, the
CMD
command
parameters,
operation
parameters
unit
is
tape
fied
is
less presents most
three
tape
unit.
Device/File
only
02
can
be
command
commands
)OUTSEL
key
you
if required,
will
number
unit 1 and
than
the digits specify For
and
while pressing
want.
take
place. Following
for
system
specifies
four
digits,
file
number.
example:
Number
entered
can
)LOAD, )REWIND
must
commands:
the
the
auxiliary
tape
the
file
two
be
entered
the
be
tape
unit 1 is
If
number
Meaning
Tape
Tape
ways:
one
)SAVE,
entered
the
)CONT,
can
be
top-row
and
is
an
unit
and
tape
unit
assumed and
value specified
and
1, file 1
1, file 2
character
entered
key
the
explanation
file
is
the
at a time
)US,
)FNS,
in
one
just
below
EXECUTE key pressed
of
to
be
used.
tape
unit
the
is
four
leftmost
from
the
)VARS,
operation
the
label
terms
The
2. If value specified re-
digits,
digit specifies
by
of
and
built-in
the
value speci-
the
)COPY,
holding
the
symbols
right-
the
before
tape
12
2002
• Workspace (with
no
11
characters
• Password (with
no blanks). If
eight are used.
Object
is
Parameters
ID
is
any
combination
blanks);
is
a user-defined
enclosed
are
entered,
any
combination
however,
more
in
the
only
of
than
function
brackets
Tape
2,
of
up
first
character
the
first
up
to
eight
eight
characters
or
variable name.
can
be
optional
file 2
to
11
11
are used.
alphabetic
alphabetic
must
be
are
entered,
in
certain
or
numeric
alphabetic.
or
numeric
only
cases.
characters
If
more
characters
the
first
than
..
Page 17
The )CLEAR Command
(
(
The
no valid name The
When
Syntax
There
The
)CONTINUE
)CLEAR
workspace
I
ndex Workspace identification Comparison Printing Printing precision
Random Data
Symbols
the
)CLEAR
are no parameters.
command
and
origin
width
number
printed
command
contains
attributes
tolerance
seed
is
successfully
clears
are
Command
the
active workspace. A cleared workspace has
no user-defined variables
set
to:
CLEAR
1E
WS
13
or
functions
64
5
16807
ALL
125
completed,
CLEAR
WS
is
displayed.
and
no
data.
(~
(
c
The
)CONTI NUE
of
the
active workspace
this
command
be resumed later
successfully
The
)CONTI NUE
)SAVE
command
stores
completed,
command
on
IBM
Notes:
1.
A clear
2. A workspace )CONTINUE mand).
3.
)COPV
written
4.
A loaded
workspace.
5.
If
is available (see
workspace was
6.
If interrupted
stored
a
stored
loaded
ATTN
workspace
and
on
tape
workspace
into
workspace
into
is
command,
active
on
the
command
(except
APLSV.
with command
)PCOPV
using
a 5100 active workspace
another
the
DWA
written pressed during a )CONTINUE and
the
using
the
specified
onto
tape
without
status,
such as
same
or
a similar machine. When
CONTINUED device/file
on
the
as
noted
below)
cannot
suspended
be
(it
cannot
commands
the
)CONTINUE
written
that
was
5100
system
to
tape.
file
is
set
written functions
to
tape
written
with
variable
to
changing
suspended
5100
is
similar
and
on
can
be
written
cannot
specify
command.
using
that
to
a larger active
in
unused.
workspace I D,
the
functions,
number
in
function
is
distinguished
tape.
only
be
to
tape
stored
the
)CONTINUE
is
smaller
tape
using
workspace,
Chapter
operation,
stores
the
contents
active workspace. Primarily,
so an the workspace
written
using
workspaces
than
the
5)
is
the
the
operation
command
and from
on
the
command
the
)CONTINUE
the
same as
system
is
ID
is
format
the
)CONTI NUE
tape )SAVE
that
original active
workspace
operation
can
displayed.
to
the
using
the
com-
were
cannot
command
when
the
is
be
13'
Page 18
7. Shared variable
execution
command. A subsequent)
media
is
restored
to
using )CONTI NUE
repositioned
or
placed
8. If a workspace stored with variable executed
or
a suspended function,
when
the
9. Workspaces are stored and loaded )CONTINUE
10. IMFs are the
stored workspace, it should be reapplied by
the
IMF
not
is
not
command
stored
already
Syntax
)CONTINUE [device/file number] [workspace 10] [:password]
where:
status
can be stored by using
LOAD allows
the
same
(that
is,
the
on a different
the
workspace
than
condition
tape
)CONTINUE
is
loaded.
using
the
as
containing
drive).
the 0 LX
int_o
the
the
)SAVE
user to, resume
when
command
system
active workspace faster using
by )CONTINUE. If an IMF
in
the
system) before
the
the
workspace was
the
shared variable
has an
command
command.
is
required for
the
)PATCH
workspace
the
)CONTINUE
execution
open
will
operation
comma~d
is
reloaded.
stored
cannot
shared
not
be
if
the
be
the
of
(if
device/file tape where vice/file
number
the
number
contents
workspace was loaded or specified by a previous )WSID
workspace I D (optional)
name must match
file
to
be used
on marked unused, to
this
workspace I
the
active workspace
:password (optional) characters must
(without
be matched when workspace. If no workspace I D ted
with
the
active workspace (if any) stored. with
If
just
the
the
active workspace
The )COPV Command
The
)COPY space written is
successfully
command
to
the
active workspace. Only objects
on
tape
with
completed,
(optional)
is
specified,
the
workspace I D
the
tape, unless
the
active workspace I D
D.
is
is
blanks), preceded by a colon. This sequence
workspace I D and
is
the
number
of
the
active workspace are
the
device/file
is
the
name
of
of
the
file
If
no name
is
specified
used.
any combination
the
stored workspace
or
password
no
is
not
used.
of
the
tape
unit and file
to
be written.
number
from which
the
command
the
workspace
both
the
is
marked unused.
and
tape file workspace I D are changed
in
of
up
to
is
is
entered,
is
assigned
password
to
be
stored. This
active workspace
If
the
the
command,
the
eight alphabetic
to
be read back into
the
password associa-
to
the
workspace being
is
entered, any password associated
is
and
or
of
copies all or specified global objects from a stored work-
in
the
)SAVE
COPI
command
ED
device/file
stored workspaces
can be copied. When
number
workspace I D
that
the
is
command
on
the
If
no de-
active
used.
the
file
is
name
of
numeric
characters
the
active
were
displayed.
14
Notes:
1.
If
the
into
the
2. If
interrupted is
unpredictable.
active workspace contains suspended functions, objects
it.
ATTN key
and
is
pressed during a )COPY
the
amount
of information copied into
operation,
the
the
cannot
system
be copied
operation
active workspace
is
Page 19
Syntax
(~
(
)COpy
where:
device/file jects are copied from.
workspace I D
:password
command. specified by this
object the jects in
device/file
number
is
is
the
If no password was assigned previously, a password
name(s) (optional)
designated
the
designated
stored
The )DROP Command
The
)DROP marked unused, the
command
displayed.
command
the
is
successfully
number
is
the
security password assigned by a previous
command.
data
workspace
the
number
name
of
the
is
the
workspace. If
stored
workspace are copied.
marks a specified file unused.
in
the
file can
completed,
ID
:password
of
the
tape
unit
stored
workspace
name
of
the
global object(s)
this
parameter
no
longer be read
DROPPED device/file
[object
and
workspace file
on
tape.
is
omitted,
After
from
name(s)]
)WSI D or
cannot
to
all global ob-
the
file has been the
number
the
)SAVE
be
be copied
tape.
When
file
ID
ob-
from
is
....
(
/
c
Syntax
)DROP device/file
where:
file
number
number
device/file
file I D (optional)
the
If
The ) E RASE Command
The )ERASE space. There mand.
command
is
no
message displayed
Notes:
1. When a
is If
2.
able will
3. Even
part
issued.
the
object
after
of
penden\
be
the
function
being erased
retracted.
the
object
active workspace
number
is
the
is
the
name
specified
erases
is
erased,
[file ID]
number
(see
is
of
the
tape
of
the
stored
is a data
the
a shared variable (see
that
file,
any
named global objects
at
the
successful
Chapter
the
7)
is
name remains
contains
unit
and
the
workspace file
file
ID
specified
from
completion
erased,
all
the
Chapter
in
the
the
symbols used).
file
on
to
be
marked unused.
the
active work-
response
8),
the
symbol
the
is
ignored.
of
the
SI
DAMAGE
shared vari-
table (the
tape.
com-
15
Page 20
Syntax
) ERASE
where:
object
object
name(s)
The )FNS Command
The)
FNS
command
active
workspace.
meter
is
specified,
or
character
Note: You
Syntax
)FNS
where:
characteds)
that
of
sequence.
can
[character(s)]
starts
with
characters
interrupt
(optional)
determines
name(s)
are
global
names
separated
displays The the
an
alphabetic
the
names
of
functions
names are displayed beginning
the
is
are listed alphabetically. If
)FNS
command
any
the
sequence
character
starting
of
point
by
blanks.
all global user-defined
the
with
the
by
alphabetic
and
contains
for
pressing
an
the
and
numeric
no
blanks. This
alphabetic
functions
character
specified
ATTN key.
listing.
character
characters
in
the
para-
sequence
The
)LIB
Command
The)
LIB
file
header
• File
• File I stored
• File
ng
i
File
00
01
02
03
command
contains
number.
D.
The
workspace,
type.
of
each
Type
displays
the
The
files
file I D can be
the
The
file
type
code:
Description
Unused file
Exchange
General
BASIC
the
following
on
tape
from 1 to
file ID
is
a 2-digit
exchange
source
file
headers
information:
are
numbered
is
the
same
code;
data
file (see
data
file
of
the
17
characters.
as
the
the
Chapter
file (see
files
on
sequentially,
If
stored
workspace
following
chart
8)
Chapter
tape
starting
the
8)
(library).
file
contains
ID.
gives
with
the
The
1.
a
mean-
16
Page 21
File Type
Description
(
(
04
05
06
07
08
16
17
19
72
• Size storage.
Number
Number
displayed if
of
the
file.
of
unused
of
defective records
there
BASIC
workspace
BASIC keys file
continued
APL chapter)
APL saved file (see )SAVE
APL internal
tape
Patch,
Diagnostic file
IMF file
Storage
The
contiguous
are
files are
more
than
dump
file (see )CONTINUE
data
recovery,
file
formatted
1024-byte
(512-byte
nine defective records.
file
format
and
in
increments
blocks
blocks) in
command
file (see
tape
copy
of
storage in
the
command
in this
chapter)
Chapter
of
file; an asterisk
file
1024-byte
the
8)
file.
in
this
blocks
(*)
of
is
(
Note: This value can indicate
data
due
to
defective areas
Following
006
""
/
The
~
______
)LlB
is
an
example
FILE6
-
__
command
of
File
Size
Available storage
Number
FileID
File
operation
when
you
should
relocate a file
on
the
tape.
a file header:
07
Ol.O
type
-1
of
the
file~
_____
of
defective records
number
can be
interrupted
t
by pressing
.•
___
OO:l
---'
()
.....
the
to
avoid loss
ATTN key.
of
c
17
Page 22
Syntax
) LIB [device/file number]
where:
device/file file number. All file headers from If
no
entry
are
currently display the file headers beginning currently
The )
LOAD
The
into active workspace. When device/file
Note: If
is
Command
) LOAD the
active
number
the
interrupted
Syntax
) LOAD device/file
where:
number
is
made,
positioned
positioned
command
workspace,
workspace 10
ATTN key
and
the
(optional)
the
at
loads
the
is
active workspace
number
is
the
display begins
at
on
tape
on
tape
unit
the
contents
completely
command
is
displayed.
pressed during a load
workspace
number
that
with
unit
with
the
2.
of a stored
replacing
is
successfully
is
cleared.
10
of
the
tape
file
to
the
end
the
first file following
1.
For
tape
first file following
workspace
the
contents
completed,
operation,
: password
of
unit
unit
the
2,
that
the
and
the
tape
the
entry
the
file
from
were LOADED
system
starting
are displayed.
the
file
you
2000
will
you
are
the
tape
in
the
operation
device/file on
workspace
:password vious )WSID, )CONTINUE, viously assigned, a password to for
The
)MAR
The
)MARK can be saved to
a specified size. Additional files
additional )MARK
When
number
number
the
tape.
lOis
is
the
the
stored workspace
this
command,
K Command
command on
it. Each )MARK
the
operation
of
the
last file marked size
is
the
number
the
name
security password assigned
but
the
error
formats
commands.
is
successfully
of
the
or
)SAVE
cannot
is
not
message
the
tape
command
of
of
the
stored
command.
be specified. If a password was assigned
specified,
WS
so
different
completed,
of
the
tape
unit
and
workspace.
to
the
stored workspace by a pre-
If
or
if
it
LOCKED
that
the
formats
sizes can be
MAR KED
last file marked
is
active workspace
a specified
the
number
no
password was pre-
is
incorrectly specified
displayed.
number
formatted
is
displayed.
of
or
data
of
by using
the
files
file
18
Page 23
(
CAUTION
file and
Syntax
Notes:
1.
The
ATTN key
2.
If
the
message was issued, specified file, to
continue.
If
an existing file
the
is
not
operative during
ALREADY
the
specified file already exists
enter
on
tape
existing files following
GO.
is
re-marked,
MARKED
If
the
is
file
is
not
the
the
re-marked file
the
)MARK
displayed
on
to
original
command
after
a )MARK
the
tape.
To
re-mark
be re-marked, press EXECUTE
information
cannot
in
be
used again.
operation.
command
the
the
re-marked
)MARK size
where:
is
size storage.
The
following
marked.
written
MAXSIZE= 3+f (CLEAR-ACTIVE)-;-1024, where:
• MAXSIZE blocks) to
• CLEAR
• ACTIVE are
The
formula
-see
Chapter
MAXSIZE= r
number
an integer specifying
The
to
tape
that
tape.
is
is
written
for a data
of
files
formulas
formula
with a )SAVE
is
the
would be required
the
th~
to
8) when all (WI!HOUT
for
maximum
value
value
tape.
can be used
of
file (data
to
mark starting file
the
size
of
each file in
to
determine
a workspace file (the
or
)CONTINUE
amount
DWA (see
of
DWA
of
the
-WITHH-1
data
to
write
Chapter
just
before
written
is 024,
of
to
contained
number
what
contents
command)
tape
storage
the
contents
5)
in
the
contents
tape
using an APL shared variable
in
where:
[device]
1024-byte
a clear workspace.
the
(1K) blocks
size a file
of
the
is
(number
of
the
of
the
active workspace
should
active
wo~kspace
of
1024-byte
active
workspace
active
workspace
of
be
is
(~i
• MAXSIZE blocks) required
• WITH
• WITHOUT
There is
written
required
type
by
Note:
fore, of
space.
stored
is
of
the
The
the
the
file plus
is
the
in
no
formula
to
depends
data
various
file
number
is
the
maximum
to
write
value
of
is
the
value
the
active workspace.
for
tape
as it
is
upon
how
is
used.
For
types
of
data,
header
for
of
bytes
0.5K.
amount
the
DWA (see
of
DWA
determining
entered
much
information
see Storage Considerations in
each
marked
of
tape
of
tape
data
to
tape.
Chapter
before
from
data
storage required
5) with
any
what
size
the
keyboard.
is
entered
on
how
file requires
storage
the
data
to
to
mark a
from
many
0.5K
for
(number
data
be
written
data
The
amount
the
bytes
bytes
each file
of
1024-byte
in
the
to
file
when
keyboard of
storage
Chapter
of
storage. There-
is
the
specified size
active work-
tape
was
the
data
of
tape
storage
and
what
are
required
9.
19
Page 24
number specified size
of files
to
to
format.
mark
is
an integer specifying
the
number
of
files
of
the
starting is
device (optional,) specifies
An
made,
To
format a tape
following
)MARK
)MARK
)MARK
The
)MODE
The serial I/O
is
in
the
Communications Reference Manual, User's Manual,
file
number
to
start.
entry
of
1 specifies
tape
unit 1 is
for
commands
12
16
10
Command
)MODE
communications
communications
command
adapter
SA21-9239,
program
four
are required:
4
2
3 7
mode,
feature
is
an integer specifying
the
tape
unit
tape
unit 1 and
assumed.
12K
files,
two
16K
5
-------~Starting
is
used
to
load
the
5100
from a tape
APL or
the
respectively.
mounted
is
no
longer available.
serial I/O
SA21-9215,
the
file
that
contains
2 specifies
files,
and
communications
in
tape
adapter
or
feature,
IBM
number
tape
drive 1. When
For
5100
the
unit
three
file
more
where
tape
2. If no
10K
number
program
information
see
IBM
Serial
formatting
to
be
files,
the
5100
I/O
formatted.
entry
is
the
or
5100
system
on
Adapter
Syntax
)MODE COM
The )OUTSEL Command
The
)OUTSEL
Syntax
)OUTSEL
where:
option
• When printed.
• When played,
• When it
is
one
ALL
OUT
OFF
is
assigned
command
[option]
of
the
is
specified, all
is
but
it
is
specified,
to
specified,
does
specifies which
following:
subsequent
only
not
go
to
none
an APL shared variable used
the
the
of
data
output
printer.
the
information
on
information
is
the
display will go
that
sent
to
the
displayed
by
the
is
displayed will be
printer;
is
printed,
printer
(see
to
the
input
Chapter
printer.
is
dis-
unless
7).
20
If no mand
parameter
or
when
is
specified,
the
machine
ALL
is
first
is
assumed.
turned
on,
After
the
a ) LOAD
ALL
option
or
)CLEAR com-
is
active.
Page 25
The
)PA
TCH
Command
(
(
The following junction with
the
• Copy IMFs (internal machine fix), program
• Load IMFs for language available again.
• Display
• Recover
occur
1.
2. General exchange (file
3. BASIC source (file
4. APL internal
• Copy
is
a list
of
the
uses
with
specially devised programs
5100.
The
uses are described
onto
another
the
the
EC
data
on
during use
Exchange (file
the
contents
tape
system program into
version
of
tape
when
of
one
of
type
type
data
format
of
one
of
cartridge.
each interpreter module.
tape
read errors (ERROR
the
following files:
01)
type
03)
(file
tape
cartridge
this
command.
on
the
in
detail, following
the
Copy
the
02)
type
08)
to
This
command
customer
IMF
active workspace,
another
support
the
program, and
007
ddd-see
tape
cartridge.
is
used in con-
cartridge supplied
list:
the
Load IMF
then
make
Chapter 11)
the
APL
(/
c
The
customer
• File 1. interpreter module
• File 2.
• File 3.
• File 4. The
• File
tains
1.
2.
3.
4. !J.!J.SHARED-Displays
The
defined
do
not
support
The
The
The
5.
APL aids. This
the
following four functions:
!J. !J.
TRACE-Traces
!J.!J.
TRACEALL-
defined function currently
!J.!J.
TRACEOFF-
workspace.
!J.!J.
TRACE
function
require
cartridge
programs
EC
IMFs for
Tape Recovery program.
Tape
Copy program.
function
to
be traced enclosed
any
arguments.
contains
that
copy
versions.
the
5100
is
a saved work.space file (WSID=APLAIDS)
all
the
Traces
the
Turns
off
the
requires as its right argument
the
following files:
or load IMFs and
.
statements
first executable
in
the
all tracing.
shared variable names
in
a specified user-defined
active workspace.
in
single quotes.
the
program
statement
currently
the
The
that
of
each user-
in
name of
other
displays
that
con-
function.
the
active
the
user-
functions
21
Page 26
This workspace file also contains the following five variables that describe the func­tions in the workspace:
DESCRIBE
1.
2.
DESCRIBE~~TRACE
3.
DESCRIBE~~TRACEALL
4.
DESCR
5.
DESCRJBE~~SHARED
These
)COPY command. For example,
workspace:
JBE~
~
TRACEOF F
functions and variables
can
be
copied
to
copy the
into
the active workspace using the
~
~
TRACE function
into
the active
)COPY 5 APLAIDS
Note: The )PATCH command
When
the )PATCH command
the following options
ENTER OPTION NO.
COpy
1.
LOAD
2.
DISP
3.
KEY-ENTER IMF
4.
END OF JOB
5.
TAPE RECOVERY
6.
TAPE
7.
-
..
are
displayed:
IMF TAPE
IMF'S
EC
VER.
COpy
PGM
AATRACE
is
not
is
used
with
required
for
using the functions in file
the tape cartridge inserted in tape drive
Flashing Cursor
5.
1,
22
Page 27
To select an tape
drive 1).
tions will be displayed again. prompting messages might be displayed for
option,
If
an
enter
option
an
number
Option 1. Copy IMF Tape
option
Once
number other the
option
(the
tape
than
those displayed
number
the
selected
cartridge must be inserted
is
has been
option.
entered,
entered,
the
op-
additional
in
(
(
The
Copy IMF Tape
• File 1, which contains
EC
Version program.
• File 2, which contains
file as follows:
1.
Copy all IMFs
2.
COpy all IMFs for APL
3. Copy specific
4. Copy specified IMFs
used. being used, it
~
..
/
Note: The
the
copy
files should be marked.
The
to
respond
tape
operation
Copy IMF Tape program will issue
to
option
allows
the
the
Copy IMF program, Load IMF program, and Display
the
IMFs for
that
apply
to
APL.
that
apply
1M
Fs by problem number.
by
problem numbers
(I
f a problem
onto' which files 1 and 2 are
is
done. Use
each message.
is
not
number
copied.)
the
is
)LlB
following files
the
5100. The IMFs can be copied
to
specified
to
command
prompting
to
be copied
the
5100
being used.
that
apply
that
does
not
be copied
must
to
determine
messages and wait for
to
apply
be marked before
from
the
what
the
5100
to
the
size
the
tape:
from
being
5100
the
user
the
c
Copying IMFs allows
5100
to
be created.
tape
cartridges containing only
Option 2. Load tMFs
The Load IMFs makes
the
• Load all IMFs
• Load specified IMFs by problem numbers (If a problem is
not
The
Load IMFs program will issue
to
each message.
Note:
The
the
performance
to
your
5100
circumvented workspace until
option
allows IMFs
APL language available again. IMFs can be loaded as follows:
that
apply
to
the
loaded.)
IMFs
if
by
number
occupy
of
the
an APL
the
is
specified
storage (space)
your
5100
problem
statement
power
is
significantly; therefore, IMFs should
does
turned
to
be loaded into
5100 being used.
that
that
does
not
prompting
not
affect
or
off
messages and wait
in
the
active workspace and can also reduce
your
command.
or
RESTART
the
IMFs
the
system program and
apply
to
the
apply
to
the
operation
The
or
IMFs will remain in
is
pressed.
that
5100
5100
for
if
the
apply
the
to
your
then
being used.
being used, it
user
to
not
be applied
problem can
the
respond
be
active
23
Page 28
Option 3. Disp
The
Disp
option
will display a 4-digit
the
module identification
are
The
EC
respond
EC
Ver.
EC
Ver.
option
is
primarily
code
and
Version program will issue
to
each message.
for
for each
the
next
prompting
your
service representative's use. This
interpreter
two
digits are
messages
module.
the
and
wait
The
EC version.
for
first
the
two
user
digits
to
Option,4. Key-Enter
This
option
IMF
is
then
or
loaded
Option 5. End of
This
option
allows written
copied
Job
causes
IMF
the
from
the
Option 6. Tape Recovery
The
Tape
Recovery
tape
can
read errors
be used
data
on
type
which gram
• Exchange (file
• General exchange (file
• BASIC source (file
• APL internal
service representative
to
file 2
on
the
tape
the
tape.
APL language
option
allows
(ERROR
the
following files:
01)
type
type
03)
format
(file
the
007
02)
type
to
enter
IMFs
containing
to
be
available again.
user
to
ddd) are occurring.
08)
recover
the
data
from
the
IMFs.
The
from
a file
The
Tape Recovery Pro-
keyboard.
IMF can
or
files on
then
The
be
24
The
Tape
respond
The
Tape
the
data
the
data
Recovery program will issue
to
each message.
Recovery program will recover as
in
the
record where
that
precedes and follows
the
tape
that
read errors
prompting
record may also
much
messages
data
occur
and
wait
as possible
is
not
recoverable; some
not
be recoverable.
in
for
the
the
file; some
user
to
of
of
Page 29
Option 7. Tape Copy Program
(
The
Tape Copy
tape)
of
drive, if available. Tape
Tape
copy
one
issues
option
cartridge
pro~pts
Syntax
) PATCH
There are no parameters.
The )PCOPV Command
The)
PCOPY space that
if a stored workspace. Therefore, from
being overlaid
written
When workspace
into
the
the
on
the
command
command
active workspace. It
objrct
name already exists in
tape
with
ID
is
displayed.
allows
you
to
to
another
copy
copies all
and
destroyed. Only objects
the
)SAVE
is
successfully
cartridge. Tape copy can utilize
also marks
and waits for you
or
specified global objects
is
the
the
object
command
completed,
copy
the
contents
the
tape
being copied
to
respond
same as
the
the
active workspace, it
in
the
active workspace
in
stored workspaces
can be copied.
COPI
ED
(up
to
from
)COPY
device/file
to
the
the
to.
each
prompt.
a stored work-
command,
is
not
is
number
end
of
marked
auxiliary
except
copied
protected
that
were
tape
from
('T
c
Syntax
where:
Notes:
1.
If
the
active workspace contains suspended functions, objects
into
it.
2. If
the
ATTN key interrupted unpred ictable.
3. If
the
specified NOT COPIED:object name
)PCOPY device/file
device/file
workspace I D
:password command. this
command.
object
name{s) (optional)
the
designated
stored
workspace are copied,
any).
is
and
the
object
number
is
If no password was assigned, a password
is
is
the
the
security password assigned by
stored
pressed during a )PCOPY operation,
amount
number
name
of
information ,copied
name already exists
is
also displayed.
workspace
the
number
workspace. If
of
is
the
the
stored
name
except
of
the
omitted,
those
in
the
ID
:password
tape
unit and
workspace on
the
of
the
global object(s)
all global objects in
already
into
active workspace,
[object
the
the
previous )WSID
cannot
in
the
cannot
the
system
the
active workspace
name(s)]
stored
tape.
be specified
to
active workspace (if
be copied
operation
the
message
workspace file.
or
)SAVE
by
be
copied
the
designated
is
is
from
25
Page 30
The )REWIND Command
The
Syntax
)REWIND
at
the
successful
)REWIND [device number]
where:
device meter
number
is
omitted,
command
completion
(optional)
tape 1 is
The )SAVE Command
The
)SAVE
out
changing loaded individual global objects can be copied workspace. When this device/file th
is
or
copied
message
command
the
contents
on
number
is
displayed.
stores
a machine with a larger
command
workspace I D
rewinds
of
the
of
this
is
the
tape
rewound.
the
contents
the
active workspace.
is
successfully
is
specified tape.
command.
(on drive 1
of
the
or
a smaller active workspace. Also,
from
the
stored
completed,
displayed. Do
There
is
no message displayed
or
2)
to
be rewound. If
active workspace
The
stored workspace can be
workspace
SAVED
not
remove
the
onto
to
the
tape
tape
active
until
the
with-
para-
Notes:
1.
A clear workspace tape
using
the
can be
written
2.
The
)COPV and )PCOPV
written
3. Depending
that
5100
4.
and
5. are stored with
6. IMFs are to the
on
tape
was
written
with a smaller active workspace.
If
ATTN
is
the
file
No
open shared variables are stored
not
reload
the
system) before
or
)SAVE
to
tape
only
on
the
amount
to
tape
pressed during a )SAVE
is
set
to
the
)CONTINUE
stored
IMF by using
the
a workspace with suspended
command;
using
commands
if
the
using
unused.
by
the
stored
however, a workspace with suspended
the
)CONTINUE
can specify
)SAVE
of
data
the
command.
)SAVE
the
)PATCH
workspace
command
in
the
)SAVE
operation,
in
operation.
was used.
stored workspace, a stored workspace
command
a )SAVE
command
is
reloaded.
function
command.
stored
workspaces
can be loaded into
the
system
operation.
If an IMF
(if
the
cannot
be
written
functions
that
were
another
operation
Open shared variables
is
required, it
IMF
is
not
is
interrupted
is
necessary
already in
on
26
Page 31
Syntax
(
)SAVE [device/file
where:
devicelfile tape device/file
workspace
is
used.
workspace name to
b,e
unused, this active
:password (optional) characters must workspace. with
If
just
with
number
where
the number was loaded
I D (optional)
must
match
used
on
the
active workspace
workspace
workspace
(without
be
matched
the
active
the
workspace I D
the
active workspace
contents
the
tape
ID.
is
when
If
no
workspace
workspace
number ] [workspace I D]
(optional)
is
specified,
the
If
used.
is
blanks),
is
of
the
or
which
is
the
workspace
unless
the
and
no name
any
combination
preceded
the
stored
ID
(if any)
and
no
is
not
the
number
active workspace are
the
device/file
was specified by a previous
name
of
the
I D
of
both
file
is
marked
tape
file workspace I D will be
is
specified
by
workspace
or
password
is
assigned
password
used.
[:password]
of
the
tape
number
workspace
the
active
unused.
in
the
command,
of
up
to
eight
a colon. This
is
to
be read back
is
entered,
to
the
is
entered,
unit
and
file
to
be
written.
from
which )WSI D command
to
be
stored.
workspace
If
the
file
changed
the
name
alphabetic
sequence
the
workspace
any
password associated
of
into
password associated
being
on
the
If
no
the
active
This
and
the
is
marked
of
or
numeric
characters
the
stored.
file
to
the
active
(
(
The )SI Command
The
)SI
command
Syntax
The
functions by next
There
)SIV
The defined each recently suspended
(see State Indicator
an *,
with
most
~ecently
)SI
are
no
Command
)SI V command
functions
function.
suspended
parameters.
function,
the
displays
most
suspended
The
the
recently
displays
(see State Indicator in
suspended
function
and
names
of
the
suspended
in
Chapter
suspended
function,
the
functions
listed first, followed by
so
on.
and
names
7). function
so on.
of
the
Chapter
are indicated
and
The
suspended
listed first, followed
suspended
7)
and
by
the
pendent
functions
and
pendent
the
names local
an
*,
next
most
user-defined
are
indicated
by
user-
with
the
recently
the
to most
C
"
./
27
Page 32
Syntax
There
The
)SYMBOLS
The
(variable names, number mand initially set
of
I N USE
allowed,
Note: When a
of workspace was
Syntax
)SIV
are
no
parameters.
Command
)SYMBOLS
of
has been issued. In a clear workspace,
symbols allowed,
is
WAS
symbols allowed in
)SYMBOLS [0]
command
function
symbols allowed can
to
125
by
displayed. When
the
former
stored
written
is
names,
the
5100.
IS
the
number
the
number
workspace
the
active workspace will
to
tape.
used
to
and
only
When
command
of
is
loaded into
of
change
symbols allowed
or
display
labels) allowed in
be changed immediately
the
the
command
symbols allowed,
is
used
the
the
number
the
active workspace.
number
be
of
is
used
number
to
change
is
displayed.
active workspace,
the
same as
of
symbols
after
a )CLEAR com-
symbols allowed
to
the
display
number
when
the
of
symbols used
of
the
number
the
stored
The
is
number
symbols
t.
)
where:
11.
(optional) symbols allowed in of
storage in
is
an integer equal
the
Notes:
1.
The
number
actual
2. When a symbol object active workspace reloaded, these of
symbols in use will be
The
total
3. space space can be changed as follows: a. Save b. Clear c.
Set
d. Copy
command.
of
number
is
erased or, in
number
to
tape
with a )SAVE
to
the
active workspace.
the
active workspace with
the
active workspace with
the
new
the
stored
to
or
greater
the
active workspace. Each symbol allowed requires eight
active workspace.
symbols allowed
allowed can be larger
is
used in
the
is
written
unused
number
names are removed
of
allowed symbols remains
of
workspace
is
the
active workspace, it remains
case
of
"VALUE
to
tape
the
same as
or
)CONTINUE
The
symbols with
to
the
than
26
that
assigned in blocks
than
the
number
ERROR",
with
the
)SAVE
from
the
the
number
the
)SAVE
the
)CLEAR
active
number
the
of
the
same
command
of
symbols in
command.
command.
)SYMBOLS
workspace
specifies
of
21;
therefore
specified.
in
never existed. When
command
symbol table;
objects
in
after
and
reloading
the
command.
with
the
the
number
the
use even
the
writing
active workspace
though
and
subsequently
and
workspace.
the
the
)COPY
the
wcrk-
number
work-
of
bytes
the
the
28
Page 33
(
(
The
)VARS
The space. included,
Syntax
where:
Command
)VARS
)VARS [character(s)]
character(s) (optional) starts with an used
command
The
variables are displayed alphabetically.
the
names are displayed beginning with
alphabetic
to
define
the
The )WSID Command
The
)WSID (workspace
number
file
written
be
mand
mand played. When workspace I D
if
is
also used
is
issued
and
workspace I D
either
without the
is
displayed.
displays
starting
a )SAVE
to
change
any parameters, device/file number workspace I D
)WSID
the
names
of
is
any
sequence
character
point
ID)
command
for
the
or a )CONTINUEcommand
or
assign
command
of
and
contains
for
an
alphabetic listing.
is
used
file where the active workspace
the
security password. When
is
issued
all global variables in
If
the
character
the
specified
alphabetic
to
with
and numeric
no blanks. This
change
or
display
is
used.
parameters, WAS device/file
the
active work-
parameter
character
characters
entry
the
tape contents
The
)WSID com-
the
is
sequence.
can be
device/
)WSI
D com-
is
dis-
that
will
number
c
Syntax
Note:
The
)WSI D command
to
change
any
information
)WSID [device/file number] [workspace ID] [:password]
where:
devicelfile where command
Note:
)CONTINUE
that
workspace
parameter
:password (optional) characters the tape.
number
the
active workspace will be is
issued.
If
this
parameter command
)SAVE
or
)CONTINUE
ID
(optional) will be
must
be
(without
security
password
only
affects
on
tape.
(optional)
entered
is
blanks), preceded
for
is
is
omitted,
will
not
command;
if
any
any
comoination
the
tape
an integer
work
the
other
the
active workspace; it
that
specifies
stored
when
either
the
device/file
unless a device/file
new name for
parameter
of
up
to
by
a colon. These characters will
file
when
the
active workspace
cannot
the
device/file
the
)SAVE
or
number
the
is
eight
is
cleared; a )SAVE
number
active workspace. This
used.
alphabetic
is
or
is
be used
number
)CONTI NUE
specified in
numeric
become
written
on
or
c
29
Page 34
Chapter 3. Data
VARIABLES
You
can store items are called variables. Whenever data
associated with length with no blanks; characters can be
names longer
significant
to
data
in
the
5100
that
name. A variable
the
first
any
combination
than
77
characters can
APL.
The +-(assignment arrow)
by
character
LENGTHi··6
WIDTl-lfo8
AREA~LENGTHxWIDTH
To
display
the
value
of
a variable,
enter
assigning it
the
variable name
name
must be
of
alphabetic
be
used,
just
the
to
a variable name. These
is
used, APL supplies
can be
up
to
77
alphabetic
and numeric characters. Variable
but
only
is
used
variable name:
the
to
and
first
assign
the
77
data
stored
characters in
remaining
characters are
to
a variable:
the
6
8
4B
DATA
REPRESENTATION
Numbers
The character
the
as than
The can
LENGTH
WIDTH
I~I~EA
decimal digits 0
- , called
leftmost
zero:
negative sign,
be
used
character
O-lJ.
only
as
through 9 and
the
negative sign,
in
the
-,
is
distinct
part
of
the
the
decimal
is
used
representation
from
- (the symbol used
numeric
constant.
to
of
point
are used
denote
negative numbers. It appears
any
number
to
denote
in
the
whose value
subtraction)
usual way.
is
less
The
and
30
Page 35
Scaled Representation (Scientific Notation)
(".
You can tiplying it representation in APL. by E and example:
The the must side
represent
Number
66700
.00284
E (E can
digits
be shifted.
of
it.
by
the
appropriate
then
an integer (the scale) representing
be
read times ten to the) in
to
the
right
There
Numeric Value Range
Numeric values in
7.237005577332262E75.
±.
5.397604346934028E -79.
numbers
the
by
The
of
the
can
be
5100 can range
The
stating a value
power
of
ten.
This
form
of
a scaled
Form
Scaled
t
6.67E4
2.84E3
E indicate
no
spaces
smallest numeric value
number
Multiplier
Scale
the
middle indicates
the
number
between
from
-7.237005577332262E75
in
some
type
the
the E and
convenient
of
notation
is a number
appropriate
of
places
the
5100 can use
range,
then
is
called scaled
(multiplier) followed
power
of
that
this
is
scaled
that
the
decimal
the
numbers
on
to
is
mul-
10.
point
either
For
form;
c
c:
Numeric Value Precision
Numbers in
digits.
the
5100 are carried internally with a precision
Character Constants
Zero
or
more characters enclosed in single
Appendix
(see
indicate functions, the
enclosing
B)
and
that
the. characters
but
represent only themselves. When
quotes
'ABCDEFG'
ABCDEFG
,
:1.23('~BC
123('~BC
M~'THE
M
THE
ANSWER
When a entered
quote
to
produce
is
required within
the
quotes,
blank characters (spaces),
keyed
do
not
represent numbers, variable names,
are
not
shown:
'
ANSWER
IS:'
IS:
the
character
single
quote
in
the
character
of
16
significant
including overstruck characters
is a character
character
constant,
constant.
constants
a pair
constant.
are displayed,
of
quotes
For
example:
The
must
quotes or
be
DON'T
'DON'
GIVE
'T
THE
GIVE
THE
ANSWER
ANSWER
AWAY
AWAY'
31
Page 36
Logical
Data
Logical (Boolean)
(>
~
= <
true
and
to
the
Logical treated
SCALAR
A single item,
It has
ing
are
A
Scalars can be used
The
variable
~:;t)
generate logical
0 if
the
condition
logical
functions
data
can also be used
as numeric 1's
whether
no
coordinates;
examples
• A I
,,,'
name
of
data
and
that
scalars:
directly
for
the
consists
data
was false.
(/\I\vv",)
with
D's.
a single
is, it
in calculations
scalar can
of
only
as
their
to
check
the
number
can
be
then
ones
and
result;
The
output for
arithmetic
or
single
thought
or
be used
zeros.
The
the
result
can
then
be used as
certain
conditions
functions,
character
of
as a
can be assigned
in
constant,
geometric
the
calculations:
relational
is
1 if
in which case it
to
functions
the
condition arguments
being
true
is
called a
point.
The
a variable name.
or
false.
is
follow-
was
scalar.
I.>
.J
ARRAYS
Array
is
the
items), vectors (strings dimensions arrays.
Indexing,
Some
2x3
l~f'2
Bi"~:~
(.·~+B
general
(multiple
for
term
of
tables). All primitive (built-in)
functions
example, can select
for
a collection
data),
matrices (tables
are designed specifically
certain
of
data,
elements
and includes scalars (single
of
data),
and
arrays
of
higher
functions
to
handle arrays
from
an array
are designed
rather
than
for
processing.
data
to
handle
scalars.
32
Page 37
One
of
the
simplest kinds thought bers can be selected from a vector
sion.
variable names, present:
that
The
of
indicate
following
as a collection
the
Nand
of of
positions
example
C;
the
arrays,
the
vector, has only
elements
by
shows assigning a numeric
names are
arranged along a horizontal line.
of
elements
a single index, since a
then
in
an
array are called indices. An
entered
to
one
dimension; it
vector
has
only
and a character
display
the
values
can
The
one
vector
they
be
num-
element
dimen-
to
re-
two
(
N~5
N
6.2
-::5
C~"
·
~;
c
ABCDEFG
Generating Arrays
The
most
common
the
array
is
to
ments
of
the
function.
used
the
number
the
blank. right
'one dimension (is a vector) seven
be supplied
matter fewer seven entries in are used.
The
to
generate a n array
values for
for
each
coordinate.
The
values
argument
from
how
than
seven elements, its
The
way
have-that
new array.
symbol for
the
elements
coordinate
Each
of
(Y).
whatever
many
elements
the
new vector. If A has
following examples
6.2
-3
888
aB8
(y~;.
:1.2
ABCDEFG'
to
generate an array
is,
the
length
The
APL
function
the
reshape
is
X p
Y,
where X
of
the
array.
to
be generated;
number
the
The
in
the
left
elements instruction 7 p A means
values are
of
elements
A has, as long as it has at least
elements
show
95.12
is
to
of
each
coordinate;
that
function
the
found
are repeated as
generation
is
is
the
For
the
this
argument
new array are
in length,
stored
more
than
specify
the
forms
an
array
p.
The
format
shape
of
the
left
argument
number
that
indicates
must
be
whatever
the
array
and
that
under
the
one
often
seven elements,
of
some
following:
the
values
is
array and Y represents
(X),
separated
you
to
seven values are
name
element.
as needed
vectors:
the
of
the
the
reshape
of
the
function
you
enter
the
length
by
at
enter
be
generated has
A. It
does
If A has
to
provide
the
first seven
shape ele-
least as
a
of
one
the
to not
('
c
7(.>:1.
2 ]
:1.2:.3123:1.
2p12~5
123
:1.23
5(.)1
.
~5
1.3 1.3 1.3 1.3
An array with
two
Columns
coordinates
(rows
Rows
1.3
and
columns)
is
called a
matrix.
33
Page 38
To
generate a matrix, lengths ordinate, coordinate, generated:
of
or
:1.
2 3
I.~
~;
the
number
or
(o1BCB
EFGH
ABC DEF
Note
that
the
the
right
argument
argument
The required a
rank
(where N
providing
(planes, rows, 3-rank in
row
in
rank
of an
to
locate
of
1,
matrices have a
is
equal
as
the
arrays.
order:
I~IBCD
EFGH
I,.JKI...
you
two
coordinates.
number
M~2
specify X (left
of
rows, and
of
columns.
3pi
The
the
2 3 4 5 6
first
second
The
argument)
number
number
following
as
two
in X
is
is
the
example
numbers,
the
length length shows
which
of
the
of
the
how a matrix
t-1
6
t.1f-2
1+
r
I
ABCDEFGH
J
I
M
M
:1.
i-
2
:.3 p t1
Mi
values
in
the
right
argument
has
more
than
one
row
order.
array
is
the
number
any
element
to
the
left
argument a number
and
columns).
Note
that
A~'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
;.~
:5
lJ.
P(.~I
\.
____
within
rank
of
rank). N-rank arrays, like matrices, are
The
following examples
the
elements
2-plane, 3-row,
row,
of
coordinates that
2,
and
indicating
taken
are arranged
the
elements
array. Scalars are N-rank arrays have a
from
in
are
it has,
the
length
show
the
right
4-column
row
taken
or
the
how
argument
array
order
from
number
rank
O.
rank
generated
for
each
to
in
the
the
of
Vectors have
from 3 to
coordinate
generate
are arranged
are
first co-
second
arrays. If
right
indices
by
the
is
63
34
MNDP
f~I~ST
UVWX
'+
AB
CD
EF
GH
IJ
1{1...
~1N
DP
GR
ST
UV
WX
3 2
\\-
f)l~
___
4-plane, 3-row,
2-column
array
Page 39
Finding the Shape
of
An
Array
(
(
Once you each is
the name sult length (number is
always a vector:
The
have
coordinate)
of
is
one number
shape
of a matrix
A~111
~)
123
'+
5 6
2 3
12~3ll·
~5
6
·7
1 2 3
generated
by
the array.
of
(.1
M~2
an
array, you can
specifying p (shape function)
If A is
a vector
because A is
elements)
222
or
3p1
a one-dimensional array. The number
of
A's one dimension. The result
333
N-rank array
2 3
M
~)M
R~2
3
4pi
2 3
R
B
Lt·
1+
444
is
5 6
1+
find
its
with
six elements
555
found the
5 6 7 B
shape
with
666
same
(number
only
and
way:
of
elements in
a right argument which
you enter
is
6, the
of
the
shape
pA,
the
function
re-
~5
6
"7
B
3
2
1
~.)
Lt·
t)
"7
B
pR
'i
3 4
.:..
I n
some
cases,
it
might
be
necessary
nates (or
shape)
indice~)
and a right argument, which
of
Ai-lll
Bf·2
Ci-2
(jA
an
array. The rank
222
3p1
2
I.~~)
1
~3
6
ppA
1
,,,
(
/
2 3
pH
p(jB
2
pC
1+
3
2
ppC
3
to
know
can
is
the name
~5~53
4'+'+
3
~i
'+
,+
:~
3
just the rank, the number
be
found
by
entering pp
of
the array:
6
~)
of
(shape
coordi-
of
the
35
Page 40
The
following
arrays:
Data
Type
Scalar
table
shows
Shape
No
dimension
what
pX
the
shapes
(indicated
and
ranks are
by
an
empty
for
the
vector).
various
Rank p pX
·0
types
of
Vector
Matrix
N-rank
arrays
Empty Arrays
Although exist.
An
when
creating lists (see Catenation in
defined
Following are
• Assign
function
-------------
0,
'-.
____________
most
arrays
array
with
(see
some
ways
10
to
a variable
EVECTOR-E"
[VECTOR
r:iEVECTOR
Number
Number
number
Each
have
one
no
elements
Chapter
to
name
of
elements.
of
rows
is
or
more
is
6).
generate
to
generate
\.0
and
the
the
length
elements,
called an
this
chapter)
empty
An by a blank
The is
zero
number
empty
arrays:
an
empty
shape
of
of a coordinate.
arrays
array.
or
when
empty
vector:
array
display.
of
the
(zero
elements).
columns.
with
no Empty branching
is
indicated
empty
2
N
elements
arrays are useful
vector
also
in a user-
36
• Use a zero length
EMATRIX:l.~<3
EMATJ~IX:1.
~)EMAT
:3
0
• A
function
shape
of
a scalar:
might
coordinate
J~
I X
1.
generate
A
when
an
empty
blank
generating a
O~)
\
0-
vector
output
multidimensional
This and
A
blank
as its result;
display.
matrix
no
(0)
output
has
three
columns.
display
for
example,
array:
rows
finding
the
Page 41
CATENATION
(~:
You can join function. The symbol or scalars and vectors,
fied,
as
together
the
following examples show:
A~~
1.
:~
5 6
Bi"'+
A,B
:l
:3
2
'+
'+
1::'
\.1
B,A
q.
~:;
6
1.
2
:.:~
(4,2
:1.
2 3
3
1-
When catenating A,[I]B, where I defines
If
the
coordinate matrices and [I] is
[2],
the
show
how
'+
3/A
'1
r:M
3
last
coordinate
to
catenate
2
1+
two
is
is
not
[1],
two
arrays
to
make a single array by using
for
this
function
the
variables are joined
I.~
:3
is
6
q.
matrices
the
matrices:
or
N-rank arrays,
the
coordinate
specified,
first coordinate (number
(number
that
the
last coordinate
of
columns)
the
catenation
the
comma. When catenating vectors,
in
the
order
the
will be
is
function
expanded
is
used. When A
of
rows)
expanded.
in which
they
can
take
the
when A and
and
is
expanded; when [I]
The
following examples
are speci-
form
B are joined.
Bare
c~
(".,
-
./
("
1.0
20
~!50
'+0
~~
10
~7j
4·0
10
20
I.~O
~5
"")
I!.
1.1-
1::-1::'
..
J ,.J
1+'+
Ai"2
B~"2
A,B
30
60
A/[2:JB
()
30
0
60
A/[lJB
30
()
60
")
A-_
:3~1
66
:3~):1.
0
20
3(-1l.:1.
1:1.
'+'+
:1.1
'+'+
,')
Lot!.
55
22
55
")
22
33
66
33
66
,
:3
()
:3:3
4·0
1.1.
Graphic
A B
!!.!j
0
<~)
0
"':'I:!'
1
+
,.J ,.J
66
-
A
B
10
40
10 40
20 50
A
20 50
10
40
11
44
30 60
30 60
20 50
22
55
Representation
11
44
B
11
22
44
55
30 60
33 66
22 55
33 66
33 66
(~
37
Page 42
A~-2
B~··2
(.1
:1.
0
20
1.1-0
~.:;O
LENGTH
~5(.)tO
'+.otl.
~
[2:JB
30
1.
:I.
1::·1::·
(~)
()
d,J
A,[lJB
ERr~DR
A~
[:I.J
Matrices ordinates not specified are ordinates not specified are following):
::.::~.~
l)(~)
20
30
:·5~3
~~2
:·5~~
77
of
unequal sizes can be catenated, providing ,that
1.,·0
~:;
0
,::.,:.-
,.J
,J
4·'+
'+'+
BB
B
60
61.)
the
same (see
not
the
77
the
first example following).
same, an error results (see
10
88
40
A
10
40
A
B
the
lengths
the
second example
20 50
20 50
10
40
11 55
30 60
30 60
of
20 50
22 66
If
the
the
co-
11 55
30 60
33 77
co-
11 55
22 66
44 88
22 66
33 77
33 77
44 88
B
44 88
A scalar can also be catenated catenated
to
a matrix. Notice
A~2
3pl0
A
10
20
30
'+0
~50
60
A,[2J99
1.0
20
30
99
l~O
50
60
99
A,[:LJ99
10
20
30
'+
0
~7j
()
6
()
9("/
99 99
A vector can also be catenated
matches
10
1.1·0
the
length
(.1,99
20
~50
of
the
88
::~()
99
ld)
8B
coordinate
to
that
20
to
an array.
the
scalar
30
~O
another
not
In
the
following example, a scalar
is
repeated
50
60
array, provided
specified. See
,
10
40
to
complete
the
the
following examples:
20
30
50
60
the
length of the vector
99
88
is
coordinate:
38
A/t:l]99
LENGTH E R
A/[l]
A
I~O
R
99
88
88
Page 43
(
The
catenate function
necessary create a matrix named PHONE where each row will represent a 7-digit telephone number. First
at
PHONE with no (0) rows and seven colum-ns:
to
use an
you
a later time. The following instruction will establish
is
useful when creating lists
empty
array
to
start
want
to
establish
the
of
information. Sometimes it
a list. For example, suppose
matrix, then add
an
the
telephone
empty
array named
you
numbers
want
is
to
_---I:->H-O-N-E-:
o
'7
Now,
the
5336686
~:;:3366B6
45e)I+7'7l
2
\_7
INDEXING
PHDNE~"O
pPHONE
telephone
PHONE~PHONEIC1]'5336686'
7(.>·~
0
_______
numbers can be added as follows:
Blank display indicates an empty
PHONE
PHONE~PHONE/C1]'4564771'
PI··IONE
pPHONE
___________
The list of
now
contains
array.
telephone
two
numbers
rows.
c
You may
Referring
integers;
to
14 15 16 17. The result A [2] the
Here are some more examples
not to
d,nly certain elements
they
which
they
is
12 (assuming
index origin).
want
to
refer
are enclosed
apply. Assume
of
the
index origin
A~11
12 13
to
in
entering A
A[3]
A[~:;
:3 7 1]
15
13 17
11
Bi":~
~I.
'+
ACB]
13
1:1.
:1.4
16
B~'ABCDEFGHIJKLMNOPQRSTUVWXYZ
8[4
1
1~
DAN
AND
CI...A
I
I~
C~22
9
18
BEG]
VIRGINIA
the
whole array
is
called indexing. Index numbers must be
brackets and written after
that A is
is
is
of
indexing:
l4
15
6 Blank Character
but
just
to
certain elements.
the
name
of
the
variable
assigned a vector as follows: A+-11 12 13
the
whole vector, and
1; see Chapter 5
16
17
the
result
for
more information
of
1
·
27 1 14 4 27 3 12
7 9
14
9 1
1 9
18J
entering
on
39
Page 44
If
you
use an index
instruction
cannot
that
be
executed
refers
to
A
11
12
13
1~
15
16
A[8]
INDEX
ERROR
ACBJ
A
You
cannot specified. For example, suppose then
error, since those elements
VALUE
an
index or
attempt
do
to
store
Z[3
I.J·]~":I.B
ErJ.rJ.D'~
Z
I::
3
I~.
::I
/'0.
anything else with an array until
values
do
not
~..
:1.
B
an
element
and
INDEX ERROR results:
that
does
not
exist in
17
after
the
that
no value has been assigned
in
certain elements within Z would result
exist:
'+6
I.).
b
to
the
array,
the
array has been
the
name Z;
in
an
/ '}
"
....
,
13
3 7 3
l..OOI(
Indices (whatever
those
expressions are finally evaluated,
indices for
the
is
array:
inside
the
brackets) can be expressions, provided
the
results are values
B
ABCDEFGH
I
,..II{
X~-1
2 3
I...MNO
P(~
RSTUVWXYZ
~:=;
B[Xx2]
BDFH,J
X
1 2 3 ~ 5
B[1+Xx:~J
The
array from which elements are selected
example, a vector can be indexed as follows:
2 3 5 7 9 11
13 15
17
does
19[7
'ABCDEFGHIJKLMNOPQRSTUVWXYZ
PA
not
have
2 ~ 2]
'[12
that
represent valid
to
be a variable.
15
15
that
11
when
For
27
16
1]
,40
nDN r'i(.:,R\'
{i
BCD E F 0 H I
-~------
,"/1<
I...
r"'1
______
N
[I
P
(-).
F-~
STU \/
.
.!
X '{
:?:
'I::
:::.:~
1+
(,1+
1
~.:.:.i
ll.j·
"':,":.1
......
I
:I.
:::~;
:I.
J D
::?
~.:.:.i
J
~~
~
~
The
shape
of
the
result
is
the
same as
the
index.
Page 45
(
Indexing a matrix The index numbers for each coordinate are separated by semicolons. Suppose M a 3 by 4 matrix of consecutive integers:
M~3
or
N~rank
array requires an index number
4p1
2 3 4 5 6 7 8 9 10 11
f<;>r
each coordinate.
12
is
(
If you ask
1.
~5
9
1.0
If
you
want
If
you
want
..,
8
Similarly,
to
M
r)
~
6
to
see
the
~z
..
)
..,
(
11
to
refer
M[2;3J
to
refer
refer
values
I.f.
8
r)
1
~
to
the
to
the third and
to
the
elements
of
M,
they
element
are displayed
in
row
2,
column 3,
fourth
elements
in
column 4, rows
in
the
usual matrix form:
you
would enter:
in
that
row,
1,2,
and 1,
you
would enter:
you
would enter:
("/
c
I.f.
8
L\.
You can use
matrix
of
those
enter:
MI:2
~)
6
9
1.0
If
you
do
not
array
that
you are indexing, APL assumes
For instance,
5 6 7 8
the
same procedure
elements
3;1.
c'
oJ
2
to
select a matrix within a matrix.
in
rows 2 and.3 and columns
1]
9
specify the index number for one or more of
that
you
want
to
get all of row 2,
you
would enter:
MC2j]
1,2,
and 1 of
the
coordinates
the
entire coordinate(s).
If
M,
you
you
want
would
of
the
the
41
Page 46
Or
to
l.J.
B
:1.2
get all
M[
:I.
5
9
of
columns
i
'0I-
4 and 1,
l.
]
you
would
enter:
Note: You still have
The
number
number
of
semicolons required
of
semicolons
Mt<5
pM
3
L~
Mr.6Jf·9
R(~NK
You can change elements. (The rest
:I.
1+
....
t'
l
I.,.
7
")
4-
I::'
d
B
••
:1.0
ERROR
M[6]t-9
elements
A~3
A
3
b
'1
(:l[
2 i
f~
'i
::5
.'"0.
:~~
0
':~
B
to
enter
the
semicolon
is
is
not
specified, RANK
LI·p\:L2
within
an
array
of
the
array remains unchanged.)
3p1
2 3 4 5 6 7 8 9
::.~
:3]~-lO
20
to
make clear which
the
rank
of
the
ERROR
by
assigning new values
coordinate
array minus one.
results:
for
If
the
is
which.
the
correct
indexed
42
Page 47
APL
functions language. User-defined functions are discussed called primitive functions, are supply
to
them.
are
of
two
types: user-defined and
denoted
by a symbol and
Chapter 4. Primitive (Built-In) Functions
those
that
are built
in
Chapter 6. Built-in functions,
operate
on
the
into
data
the
you
APL
(
The value two are said be single multiple tables defined
There are There functions are set
or
values
arguments, such
to
be monadic, such
data
items (scalars), strings
of
data
functions
two
are also
and
up
as
that
types operators
operators
they
would appear
you
supply are called arguments. Primitive functions
as
A";-
B,
are said
as";-
B,
(N-rank arrays). Arguments can also be expressions
result
in
a scalar, vector, matrix,
of
primitive functions: scalar functions and mixed functions.
that
operate
are provided
on
PRIMITIVE SCALAR FUNCTIONS
Scalar functions arrays
element
pend
on
the
lation
between
following table. Each scalar
Argument A
operate
by element.
shape and rank
tile
types
on
of
scalar arguments and arrays.
The
shape and rank (see
of
the
arguments.
arguments
function
Argument B
to
be dyadic;
which yields
of
data
(vectors), tables
on
the
primitive functions. Examples
throughout
the
display.
For
and
the
shape
is
described following
functions
the
reciprocal
this
chapter
Chapter
dyadic
of
that
use
of
B.
Arguments can
of
data
(matrices),
or
N-rank array.
for easy reference and
They
are
extended
3)
of
the
scalar functions,
the
result
is
shown
the
table:
Result
that
one
argument
or
of
to
result de-
the in
the
use
or
user-
the
re-
(~
('"
Scalar Scalar Scalar
Array Array with
shape as A shape
Scalar
or
one-
element
Array any
One-element One-element array array with
array shape same shape as
of
shape element array shape
Array
Scalar
different rank
the
same Array with
of
any
or
one-
the
rank with
from
the
of
A
arguments
Array with
argument B
Array with
One-element array
the
array with
greater rank
as
the
as
argument
the
shape
the
the
the
same
same
A
of
the
43
Page 48
The + Function: Conjugate. Plus
[]
/
Monadic (One-Argument) Form:
The
conjugate
numeric scalar, vector,
of
the
argument:
.J
If B
is
an
the
result
array,
is
the
B~2
function
A~"
'H~:;
+(.~
the
function
shape
3p-3
does
or
of
B:
B
H'~3
'''2 '-l.
(}
1-
2
+B
-2
'-1
Conjugate
not
other
array, and
is
extended
-2
change
-1
+8
the
argument.
the
shape
to
each
0 1 2
of
of
the
The
argument
the
result
elements
is
of
can be a
the
B.
same
The
as
that
shape
of
Dyadic (Two-Argument) Form:
The
plus
function
results in numeric scalars, vectors, one
of
the
same shape,
arguments
the
is
result has
3+~3
6
5.73
:1. :1.
Plus
the
or
other
a scalar
the
'W
:1.
A+B
sum
of
the
two
arguments. The arguments can be
arrays. Arguments must be
or
single-element array.
same shape as
N'
~3
+~.l.
the
arguments:
2
()
'+
the
If
the
arguments have
same shape, unless
the
44
Page 49
(~
(~
If
one as of
that
the
:l.
LI·
argument
of
multielement
...
)
......
5
the
Bf·2
B
~3
6
is
other
a scalar
input
array:
:.3
(.>:1.
or
single-element array, the shape
argument.
'")
,:..
The
.7.
I::·
,.I
,.)
6
3+B
6
4-
~5
9
7 B
B+3
!5
6
'4·
·"1
(
9
8
The - Function: Negation, Minus Q
single element
is
applied
of
the
result
to
every
is
the
element
same
Monadic (One-Argument) Form: Negation
The
negation
numeric scalar, vector,
the
argument:
function
A~-·:J.
changes
or
·":3
other
the
sign
array.
A
···3
·":1.
····I~
If
the
argument
is
B~2
an array,
3p-3
the
-2
function
-:I. 0
B
-3
···2
-1
o
:J.
2
..
MB
:3
2
-1
:I.
-2
()
-8
of
The
is
the
argument.
shape
extended
:I.
2
of
the
to
The
result
each
argument
is
the
element
same
of
can be a
as
that
the
array:
of
45
Page 50
Dyadic (Two-Argument) Form: Minus
A-B
The
minus function subtracts argument B from argument
numeric scalars, vectors,
one
of
the
less are
the
arguments
same shape, the result has
~:~""2
or
is
other
arrays.
a scalar
the
The
arguments must be
or
any single-element array. If
same shape as
:I.
1+····~5
'+'-
'''~:5
9
2 0
If
one same as element
argument
that
of
is
a scalar
of
the
the multielement array:
B~2
or
other
input argument.
3p1
2 3
a single-element array,
~
5 6
The
single element
B
:l
2
~5
1+
5 l)
:~"MB
2
:I.
0
"'1 '-2 "'3
B-'3
'-2
-':1.
0
1.
:?
:3
the
arguments:
-1+
the
shape
A.
The arguments can be
the
same shape un-
the
arguments
of
the
result
is
applied
to
every
/ "
I~.
)1
is
the
46
The x Function: Signum, Times (IJ
Monadic (One-Argument) Form: Signum
The
signum function indicates
- 1
is
the
result;
if
the
argument
tive, 1
is
the
result. The argument can be a numeric scalar, vector,
The
shape of
the
result
is
the
same
the
is
xB
sign
zero,
as
that
of
"':l 0 1
the
argument:
then 0 is
of
the
if
the
result; if
argument:
the
argument
the
is
argument
or
other
negative,
is
posi-
array.
Page 51
If
the argument
is
an
array, the function
is
extended
to
each of the elements:
(
B~2
-~~
1 2
-1
3p-2
B
0
~5
-1
xB
"'1
-1
0
1
:I. :I.
Dyadic (Two-Argument) Form: Times
The times function result arguments can the same shape, unless one of the arguments Arguments of the same shape
be
numeric scalars, vectors, or other arrays. The arguments must
is
the product of argument A times argument
have
2x2.1
. 2
2
1+
6.1
12.2
"'16
0 1 2 3
AxB
is
a scalar or any single-element array.
the same shape result:
-1+
B.
The
be
If
one argument
as
same element of the multielement array:
that of the other input argument. The
is
a scalar or a single-element array, the shape of the result
B~2
3p1
2 3 ~ 5 6
B
:I.
2 3
'+
5 6
3xB
369
:1.2 :1.5
18
single
element
is
applied
to
is
the
every
47
Page 52
The"," Function: Reciprocal, Divide
CD
Monadic (One-Argument) Form: Reciprocal
The
reciprocal
a
numeric
the
argument:
O
If
the
I::'
....
,
argument
function
scalar, vector,
is
B~-2 2 ~)2 . ~5
result
or
an array,
is
other
the
the
reciprocal
array.
function
B
2 0 . 2 0 .
'~'H
o .
~:5
o .
!:j
~:;
~,:;
-;'-8
The
shape
is
extended
of
the
argument.
of
the
to
result
each
of
The
is
the
the
elements:
argument
same as
can be
that
of
Dyadic (Two-Argument) Form: Divide
The
divide
function
The
arguments can be numeric scalars, vectors,
be
the
same
shape unless
Arguments of
,.,
,:.,
:I.
~5
If
one
argument same as element
that
of
B~2
of
the
result
is
the
one
of
the
same shape have
is
a scalar
the
l)1ultielement array:
2p1
other
or
a single-element array,
input
10 20
argument.
B
:I.
10
20
lOO
~5+B
~3
o .
:J.~;
0.3
()
.
():~
A-;'-B
quotient
the
when
arguments
the
same shape result:
:1.00
argument.A or is
The
single
other
a scalar
the
element
is
divided by
arrays.
shape
The
arguments
or
a single-element array.
of
the
result
is
applied
to
argument
must
is
the
every
B,
\~,
48
Page 53
(~
(
Note:
There
are
two
additional
When
zero
is
1.
2.
:1.
Any
()
value
..
:.
0
other
divided
than
by
zero
zero,
3+0
DOMAIN
ERROR
:'5'~"
0
,
....
The rFunction: Ceiling, Maximum
rules
that
the
cannot
OJ
apply
result
is
be divided
to
1 :
the
by
divide
zero:
function:
I
('
Monadic (One-Argument)
The
ceiling
function
is
rounded the array.
same
The
up),
as
shape
unless
the
argument.
of
'+
If
the
argument
:1.
2
2 2
B~2
B
1
is
an array,
Form:
result
the
2pl
the
result
1.3
is
argument
The
Ceiling r B
the
next
already
argument
is
the
same
the
function
1.5
1.
:'5
integer larger
is
an
integer. In
can
be a numeric
as
that
of
is
extended
2
than
the
argument:
to
each
the
argument
this
scalar, vector,
of
case,
the
elements:
(the
the
argument
result
or
other
is
Note:
The
result
Chapter 5 for
of
the
ceiling
information
on
function
the
OCT
depends
system
on
the
variable).
OCTsystem
variable (see
49
Page 54
Dyadic (Two-Argument) Form: Maximum
The
maximum
numeric scalars, vectors,
one
less
same shape have
of
function
the
arguments
result
or
other
is
a scalar
the
same shape result:
is
the
arrays.
3
-·I.)r···:1.0
'''6
'-:1.
'-3 r
~:.=;
a single-element array,
~5
'+
If
one
argument same as of
that
the
multielement array:
:L
:3
2
r.:'
1+
,J
I.>
"7.
.J
::3
3
I::'
,J
6
'+
~j
:1.
is
of
the
Bi··2
B
~5r
B
a scalar
other
3p:1.
or
argument.
2
ArB
larger
of
the
The
arguments
or
any
single-element array.
j.
The
I::'
,J
single
6
o
element
arguments.
must
"'4-
the
shape is
applied
The
arguments can be
be
the
same shape un-
Arguments
of
the
result
to
every
of
the
is
the
element
50
Page 55
(
(
The L Function: Floor,
Monadic (One-Argument) Form:
The
floor
function
is
rounded
is
the
array.
down) unless
same as
The
shape
the
Minimum
result
argument.
of
the
result
3 "'3
LI.I·
If
the
argument
is
B~2
B
an array,
2pl
1-
1.6
LB
1 1
:1.
2
Floor
is
the
next
the
argument
The
is
the
the
function
1.5 1.6
:I
2
LB
integer smaller
is
already an integer.
argument
same as
is
2
.•
~5
than
the
argument In
this case,
can be a numeric scalar, vector,
that
of
the
argument:
extended
to
each
of
the
elements:
(the argument
the
result
or
other
c
Note: The result
Chapter 5 for information
Dyadic (Two-Argument) Form:
The
minimum
numeric scalars, vectors, less
one
of
the
same shape have
of
the
function
a~guments
the
same shape result:
1+1
..
6
1+
2
'-fo)
I..
"'10
"'1.0
5 . 1
-1,
5
.1
"'4·
floor
on
Minimum
result
or
other
is
a scalar
-:I.
function
the
is
the
'-:31
depends on
OCT system variable).
ALB
smaller
arrays.
or
..
5.1
of
The
any single-element array. Arguments
the
the
arguments.
arguments
OCT system variable (see
The
arguments can be
must
be
the
same shape un-
of
the
c
51
Page 56
If
one same as of
the
t
1+
:t.
:05
argument
that
multielement
000)
,.
...
0
1::
,J
2
:3
is
of
the
Bioo::o~
B
ooz
'0)
I:>
:sl..
B
-1,
'\.0)
:3
a scalar
other
array:
3(.):1.
or
a single-element array,
argument.
2
:05
1+
The
1::.
'oJ
single
(:)
the
element
shape
is
applied
of
the
to
result
every
is
the
element
"~,
))1.
The I Function: Magnitude, Residue
Monadic (One-Argument) Form: Magnitude I B
The
magnitude
can
be
a numeric scalar, vector,
that
of
as
the
argument:
function
result
is
or
CD
the
absolute value
other
array~
100('.9
7.9
100.3
3
If
the
argument
B~2
is
an
2p-S.t
array,
the
-t
function
0
3.t4-
is
B
0.0~5
1
o
IB
~o:j
:I.
00.:1.
:.:~
. 1
'+
o
The
extended
of
the
shape
to
each
argument. of
the
result
of
the
The
argument
is
the
elements:
same
52
Dyadic (Two-Argument) Form: Residue A I B
The
residue
the
remainder when
apply
1.
function
when using
If
argument A is
result (when
argument B is
the
residue
equal
both
divided
function:
to
zero,
argument
then
016
6
by
argument
the
result
A and
is
argument
A.
The
equal
B are positive)
following rules
to
argument
is
B:
Page 57
(
2.
If
argument A
argument A and zero (the result can be equal
argument A).
a.
When argument B from argument B until a value between argument A and zero
is
The
not
result
equal
to
zero,
is
obtained as follows:
is
positive,
:315
2
then
the
the
absolute value
result
to
'zero,
is
a value between
but
not
equal
of
argument A is
to
subtracted
is
reached:
(~
c
b. When argument B
argument B until a value between argument A
is
negative.
1
The
arguments can be numeric scalar, vectors,
be
the
same shape, unless
array. Arguments
one
of
the
same shape have
of
the
:317
:I.
:":~
1 6
0
61
:3
3
()
17
7
71
0
0
-"21
12.
~5
""":I.
.7
"-21
""":1.2.
~3
-0
.
~5
-'12.3
21
1
.7
1
12
.
~:~B~5
.
:3B~)
0
"""~?
1
:3B~:=j
6:1.~)
0
:1.
the
absolute value
arguments
the
of
argument A is
and
zero
or
other
arrays.
is
a scalar
same shape result:
or
any single-element
is
reached:
The
arguments must
added
to
c
C
If
one
argument
same
as
that
of
the
multielement array:
3
1 2
6
~5
'+
0
:I.
2
()
:1.
2
of
the
B'""2
B
31B
is
a scalar
other
:3(.>:1.
or
a single-element array, the shape
argument. The single element
'")
:'5
-:-
'+
/.)
~:)
is
applied
of
the
to
result
is
the
every element
53
Page 58
The * Function: Exponential, Power
Monadic (One-Argument) Form: Exponential
The
exponential function result
to
the
power indicated by
vector, or other array.
The
is
the
Naperian base e (2.718281828459045) raised
the
argument. The argument can be a numeric scalar,
shape
of
the
*:1.
2.71.B:3
')f3
20.0B6
If
the
argument
is
an array,
Bi··~?
2pO
the
1.
function
2
:~
13
()
1
2 3
*B
~?.
1.
7.389:1.
Dyadic (Two-Argument) Form: Power A * 8
The power function result
B.
The
argument arguments must be
single-element array. Arguments
arguments can be numeric scalars, vectors,
is
the
same shape unless one
7:1.8~5
20
. 08l)
argument A raised
of
the
*8
result
is
the
same
is
extended
same shape have
to
of
to
the
power indicated by
the
arguments
as
that
of
each element
or
other is
a scalar,or any
the
same shape result:
the argument:
of
the
array:
arrays. The
0.25
1
3
o .
:I.~?'5
The
root
the
reciprocal
by
:I.
2
2~'3
...
-------2*-3
of a number can be found by raising
of
the
root. For example,
:1.
'+'
<j
:I.
6·)f··:··2
~5
'+
= 1/23 = 1/8 = .125
to
the
find
number
the
square root:
to
the
power indicated
54
Page 59
(
(
("
The
If
one
argument
same
as
that
of
the
multielement array:
:L
2
~5
1+
of
the
B~"2
1-3
1.
is
a scalar
other
2(.>:1.
or
a single-element array, the shape
argument. The single element
2 3
9
...
Function: Natural Log, Logarithm
The
~symbol
is
formed by overstriking
CD
the
0 symbol
of
is
applied
CD
and
the
* symbol.
the
result
to
every element
is
the
c
(""
Monadic (One-Argument) Form: Natural Log
The natural log function result
(2.718281828459045).
or
other
array. The shape
m2.7:1.B3
1.
m~.?O
. OBb
is
an array,
2(.>:1. 3 :1.0
If
..
.,
,:)
the
argument
Bfo2
is
the
log
The
argument can be a non-negative numeric scalar, vector,
of
the
result
the
function
20
B
:I.
3
to
20
wB
o
2.3026 2.9957
1.0986
~B
of
is
the
is
extended
the
argument B
same
as
that
to
of
each
to
the
the
argument:
element
Naperian base e
of
the
array:
Dyadic (Two-Argument) Form: Logarithm
The logarithm function result The
arguments can be numeric scalars, vectors,
be
the
same shape, unless
of
the
Arguments
same shape have
one
is
of
the
the
the
2m8
2 3
'+(+)8 9 :1.6
322
Ae
B
log
of
argument B
or
other
arguments
same shape result:
is
a scalar
to
the
base
of
argument A.
arrays.
The
arguments
or
any single-element array.
must
55
Page 60
one
If same as of
the
1 2
:3
argument
that
multielement
is
of
the
B~··2
B
1+
a scalar
other
array:
2p1
or
a single-element array,
argument.
2
:3
ll·
The
single
the
element
shape
is
applied
of
the
to
result
every
is
the
element
o
0,1+771.2
The 0 Function:
Monadic (One-Argument) Form:
Thepi
times
argument the
same
3,
:1.
(7
,4·24·8
If
the
argument
1.
2
3
1+
Pi
function
can be a
as
that
of
01
1
+16
o:~
is
B~··2
B
(:)B
:~,
11+16
9,1+24·8
Times, Circular
result
numeric
the
argument:
an array,
2~):t
(),:5010~3
0,60206
CD
Pi
Times 0 B
is
the
value
of
scalar, vector,
the
function
2
:3
ll·
6,28:52
1.
2 ,
or
is
:::;66
pi
(3.141592653589793)
other
array.
The
extended
to
each
shape
element
times
of
the
of
the
B.
The
result
array:
is
56
Dyadic (Two-Argument) Form: Circular
The
circular
(argument
numeric
one
less
same shape result.
related
of
a positive
will result
function
A)
for
the
scalars, vectors,
is
a scalar
functions
in
or
The
performed.
argument
DOMAIN
result
is
the
specified radians
or
other
single-element array.
following
A negative
A;
any
values
ERROR:
Ao
B
value
of
(argument
arrays.
is
Arguments
a list
of
argument A is
for
argument A other
the
specified
B).
Arguments
the
values
trigonometric
The
arguments
must
be
the
of
the
same shape have
for
the A argument
the
mathematical than
function
can be
same shape, un-
and
inverse
the
following
the
the
Page 61
Value
of
A
Operation Performed
(
('
008
loB
208
308
408
508
608
708
Cosine 8
Hyperbolic sine
Hyperbolic cosine of 8 (cosh 8)
Hyperbolic tangent of 8 (tanh 8)
Arcsin 8
Arccos 8
Arctan 8
of
B (sinh 8)
(~
(:
Arccosh 8
Arctanh 8
If
lent
0
8
is
45
here
is
how
to
,
to
pi
radians divided by 4):
B~"o":"1+
B
o I
7B~54·
o .
707:1.1.~.------_Sine
O.70711
1.
~.-----------Tangent
/,-------the
:loB
20B
..
·------Cosineof8
:~()B
solve for the' sine, cosine, and tangent of 8 (450 is
The
left argument specifies
trigonometric function.
of 8
equiva-
of 8
c'
57
Page 62
If B is
the sine of an angle, then OoB yields the cosine of the same angle, and con-
if B is
versely,
0
,
30
which
o .
o .
o .
O
If
one argument
as
same
the cosine, OoB yields the sine. Suppose you wanted the sine of
is
equivalent
H'"':l
B
~3
~.-----------Sine
Oe)B
B660:3~>4---------Cosine
B~-20
B
BI.>603~.---------Cosine
Oc)B
t!!-~.
___________
\J~
is
that
of
the
to
pi
divided by 6:
()
(c)-~-6)
0
of
30
0
of
30
«)":--I.>
)
0
of
30
Sine of
30
0
a scalar or a single-element array, the shape of the result
other argument. The single element
is
applied
to
of the multielement array:
A'""2
2(.>:1. 2 :-5
Bt-t")--;·1+
A
is
the
every element
()
.
7B~5'+
0.7071:1.
t
AoB
()
.7071
:1..2716
:1.
58
Page 63
(~
The!
Function: Factorial, Binomial Q 0
The!
symbol
Monadic (One-Argument) Form: Factorial !B
The
factorial
the
number
vector,
or
is
function
value
other
formed
of
the
array.
by overstriking
result
is
the
argument.
The
shape
of
the
product
The
the
p+
24-
:l.X2x3X4-
24-
,')
.:..
l.
6
The
factorial
integers are
of
the
7.173~5
not
mathematical gamma
!1
2
function
! 3 . 1
:~
2
4-
1
.1.
120
also works with decimal numbers
allowed. When used
~'5
function
in
this way, factorial can be defined by use
- (!A)
'+
!O
1.
quotation
of
all
argument
result
is
is
equal
mark ( , ) and
the
positive integers from
can
be
a positive numeric scalar,
the
same as
to
that
and
zero,
gamma (A-1):
the
of
but
the
period (.).
one
argument:
negative
to
c
If
the
argument
()
I'Jr
.:..
1.
3
,')
:I.
..
'-
B
B
!B
...
is
2
an array,
2pO
the
1
function
")
.....
:~
:1.
6
is
extended
to
each
of
the
elements:
59
Page 64
Dyadic (Two-Argument) Form: Binomial
The
binomial
that
can be
the
binomial expansion vectors, arguments
have
the
function
taken A at
or
other is
a scalar or any single-element array. Arguments of
same shape result:
2
arrays.
!l+
result
a time.
of
the
The
is
the
The
th
8
argument
f.)
2!6
1 1::'
.,J
~5
!
()
0
()
!
:3
1
2!3
3
If
one argument same as of
that
the
multielement array:
of
is
the
a scalar
other
or
a single-element array,
argument.
A!B
number
result
power.
must
w
The
of
different
of
A! 8 is
The
arguments can be numeric scalars,
be
the
x
>-
..
....------
single
element
combinations
also
the
(A+l)
th
same shape, unless
the
y
Z !
........
J-----Argument
The combinations argument 8 argument A(2)
the
shape of
is
applied
the
to
of
argumenf
coefficient
one
of
same shape
taken
result
is
the
every
element
B
of
the
B
of
at a time
'')
~5 ! ~5
:L
':N
0
1
~5
3
1
")
1
'+
0
1+
I.>
B~"2
:I, :I,
I+!
3
.:-
2~)0
1 2 3
1+
B
o 1
2 3
:I.
I.)
4,
I
~5
to
10
1+
7Qx(P-l)!
10
2 !
"',+
~5
10
10
7,87~:j
If noninteger arguments are used, this
follows: Beta (P,Q)
is
equal
function
P+Q-l
relates
to
the
beta
function
as
60
Page 65
(
(
(
The?
Function: Roll
Monadic (One-Argument) Form: Roll ?8
The
roll
function
through
chance
other
8 (depending
of
being selected.
array.
The
('71
I~
result
on
shape
is a randomly
the
index origin). Each integer in
The
argument
of
the
result
7300
202
?:30
()
3
?~5
7 9
2
:I.
'?6
6
1.1·
!5
6
76
6
6
If
the
argument
is
an
array,
the
function
selected integer
can be a positive integral scalar, vector,
is
the
same as
is
extended
from 0 through
the
that
of
the
to
each
element
range has an equal
argument:
of
8-1
the
or
1
array:
or
(~
('
B~2
B
1.:1.
2~?
33
",.1+
!7.i
!:5
6
t')
?B
2
:l7
:1.6
21+
:I.~~
,+
Dyadic (Two-Argument)
See
the
Deal
function
3pl1
Form
later
22
in
this
33
chapter
~4
under
55
66
Primitive Mixed Functions.
c
61
Page 66
The A Function: And
Monadic (One-Argument) Form
is
There
Dyadic (Two-Argument) Form: And A/\ B
The value or
is
shape result:
no monadic form.
and function result
of
the
arguments must be either 0
other
arrays.
a scalar
or
any
CD
is
1 when A and B are
The
arguments must be
single-element array. Arguments
both
1; otherwise,
or
1.
The
arguments can be scalars, vectors,
the
same shape unless one
of
the
the
result
of
the
same shape have
is
O.
The
arguments
the
same
0
:1.
0
()
()
0
If
one
argument same as of
that
the
multielement array:
0
:1.
:I.
0
0
:J.
:1.
0
01\
:1.1\:1.
1AO
0
:I.
of
the
Bf·2
B
j.AB
:1.
0
is
a scalar
other
2pO
Operator
:tAO
:1.
1.
0
:I.
or
a single-element array,
argument. The single element
1-
1 0
the
And Table
'---
shape
of
is
applied
o
Argument B
the
result
to
every element
- Argument A
is
the
Page 67
The v Function: Or
GJ
(:
Monadic (One-Argument) Form
There
is
no monadic form.
Dyadic (Two-Argument) Form: Or A v B
The
or
function result
result
is
O.
The values scalars, vectors, one
of
the
arguments
same shape have
is
a 1 when either
of
the
or
other
arrays.
is
a scalar
the
same shape result:
arguments must be 1 or
The
or
any single-element array. Arguments
1vO OvO
o
o
0 1
1vO
1 0 1
o 1 1 1
or
both
arguments are 1; otherwise,
O.
arguments must be
Operator
'"
The
arguments can be
the
same shape, unless
Or Table
v
the
of
the
......
I----Argument
A
c
C/
c
one
argument
If
same
as
that
of
the
multielement array:
0 1
()
1
j. j.
:1.
1
is
a scalar
of
the
other
B~··2
2pO
B
lvB
or
a single-element array,
argument. The single element
j.
0 1
the
shape is
applied
of
the
to
result
is
the
every element
63
Page 68
The'"
Function:
Not
GJ
Monadic (One-Argument) Form:
The
not function result
ment must be 1 of
the
result
is
or
the
O.
The
same
is
as
1
o
If
the
argument
1 0
0
0
1
()
1
()
1 0
is
B~"2
H
1
NB
1
an array,
3(.>0
Not
'"
B
1 when B
argument can be a scalar, vector,
that
the
is
0 and 0 when B
of
the
argument:
function
is
extended
is
1.
to
each element
1
The
or
values of
other
array.
of
the
the
The
array:
argu-
shape
Dyadic (Two-Argument) Form
There
is
no dyadic form.
64
"'
..
Page 69
The
A Function: Nand
OJ
CD
(
c
The A symbol
Monadic (One-Argument) Form
There
is
Dyadic (Two-Argument) Form: Nand
The
nand function result
The values other
arrays. The arguments must be
is
a scalar
shape result:
is
formed by overstriking
no monadic form.
is
0 when
of
the
arguments must 1
or
any single-element array. Arguments of
O~l
1
o
o
0 1
1XO
:I. 1 :I.
0
:I.
the
AAB
both
A and
or
O.
The arguments can be scalars, vectors,
the
same shape, unless
0 1
and
Bare
(/\)
and
1;
otherwise,
the
same shape have
Nand Table
the
not
one
(,...,)
symbols.
the
result
of
the
arguments
.----Argument
the
is
1.
same
or
A
c
If one argument same
as
that
of
of
the
multielement array:
B~"2
B
0
:I.
1
0
1XB
:I.
0
0
1.
is
the
a scalar
2pO
or
a single-element array,
other
argument. The single elemeht
:L
the
shape is
applied
of
the
to
result
is
the
every element
65
Page 70
The V Function:
The
v symbol
Monadic (One-Argument) Form
There
is
Nor
IT)
is
formed
no monadic form.
OJ
by
overstriking
the
or
(v)
and
the
not(rv)
symbols.
/'
"
Dyadic (Two-Argument) Form:
The
nor
function result
values
of
the
arguments
other
arrays.
is
a scalar
shape result:
The
arguments
or
any single-element array. Arguments
o
O\jO
1
o
()
:1.
:I.
0 0 0
If
one
argument same as of
that
the
multielement array:
of
is
the
a scalar
other
Nor
A
vB
is 1 when must
:l(JO
argument.
A and B are
be 1
or
O.
must
be
the
:1.
0
1.
or
a single-element array,
The
both
0; otherwise,
The
arguments can be scalars, vectors,
same shape, unless
of
the
same shape have
the
shape
single element
is
the
one
of
Nor Table
of
the
applied
to
the
result
arguments
the
~---
result
every
element
is
is
O.
or
same
the
The
Argument
A
66
0
0
:I.
:1.
1
1
0
0
B~M2
B
OC:B
2?>O
1
Page 71
The >Function: Greater Than [I)
Monadic (One-Argument) Form
is
no
There
monadic form.
(
(
Dyadic (Two-Argument) Form: Greater Than
The greater than function result otherwise the result arrays. The arguments must scalar or any single-element array. Arguments of the same shape shape result:
is
O.
is
The arguments can
be
the same shape, unless one of the arguments
A>B
1 when argument A
be
numeric scalars, vectors, or other
o
-'2>
0
o
.-
~.~
;:
....
~~
o
1
o
'-:1.
5,1
o o 1
If
one argument
same
as
tha,t
of the multielement array:
is
a scalar or a single-element array, the shape of the result
of the other argument. The
'-~3>~5,
1
single
o
'''1·1·
element
is
greater than argument
have
the same
is
applied
to
every element
B;
is
a
is
the
('~,
ll,
/
e
2
1+
~3
OCT
system variable).
~5
(.>
B~"2
.f.{
-x
••
c'
..
}
1
0 0
1
6
3>B
0
1 2
I~.
1
0
Note: The result of the > function depends on the
Chapter 5 for information on the
:1.
1'-
,'J
t.)
OCT
system variable
(see
67
Page 72
The = Function: Equal To
Monadic (One-Argument) Form
There
is
no
monadic form.
Dyadic (Two-Argument) Form: Equal To A=B
[J
The equal to function result
of argument can be scalars, vectors, or other arrays. The arguments must be the same shape, unless one of the arguments of the
same
B;
otherwise, the result
shape
have
is
1 when the value of argument A equals the value
is
O.
The arguments (numeric or character)
is
a scalar or any single-element array. Arguments
the same shape result:
0::::5
()
1,65~321=1,65~321
1
1::::
I A I
o
.'
A
I::::
'B'
o
':1.
':::::1.
o
:I.
o
o 0
If
one argument
same
as
that of the other argument. The single element
of the multielement array.
is
a scalar or a single-element array, the shape of the result
is
applied to every element
is
the
68
'A':'ABACADAEAFAG'
101
Note:
OCT
system variable (see Chapter 5 for information on the
0
101
If
the arguments are numeric, the result of the = function depends on the
0 1 0 1 0
OCT
system variable).
Page 73
(--
The < Function:
Monadic (One-Argument) Form
is
There
Less
Than
no monadic form.
CD
Dyadic (Two-Argument) Form:
The
less
than
function result
wise
the
result
is
O.
The arguments can be numeric scalars, vectors,
-'+
.
the
'+
The arguments must be any single-element array. Arguments
:L
.65<2
1
:I.
:I.
0-::
o
:I
.•
12~5<:I
o
5.1
o 1 0
If
one
argument
same
as
that
of
the
multielement array:
of
is
the
a scalar
other
Less
Than A < B
is
1 when argument A
same shape, unless one
of
the
.•
:1.23
or
a single-element array,
argument. The single element
is
of
same shape have
the
less
than
the
arguments
shape is
applied
argument
the
same shape result:
of
the
to
or
other
is
a scalar
result
every
8;
other-
arrays.
or
is
the
element
('
('
c
3p:L
f.u"2
B
I")
1
3
-:"
c'
l~
..J 6
~5<B
()
0
0
:L
1
:L
B<3
:L
l.
0
()
0
0
Note:
The
result
of
the
< function depends
Chapter 5 for information
~'5
~!
on
the
5 6
'+
OCT system variable).
on
the
OCT system variable (see
69
Page 74
The
~
Function: Greater Than
or
Equal
To
[~)
Monadic (One-Argument) Form
There
is
no monadic form.
Dyadic (Two-Argument) Form: Greater Than
The
greater
or
equal scalars, vectors, of
the shape have
than
to
argument
arguments
the
same shape result:
1
or equal
B;
or
other
is
a scalar
65;::2
.
to
function result otherwise, arrays.
or
the
The
arguments must be
any single-element array. Arguments
0
"'2;::0
(I
:~~
;::
~~
1
~5
.
1.
:I.
1
If
one
same as of
the
argument
0
0
is
a scalar
that
of
the
other
multielement array:
or
a single-element array,
argument.
The
or
Equal To
is
1 when argument A
result
is
O.
The
single element
A~
B
is
greater
arguments can be numeric
the
same shape, unless
of
the
the
shape
of
the
result
is
applied
to
every element
than
same
is
the
l_;,
one
1
1+
:1.
()
Note:
5
for
Bf'2
B
'')
.:.,
3
!7j
6
3~:B
1 1
0
0
The
result of
information
3
I.f.
1::'
..J
;!.
3pl
the ~ function depends
on
the
OCT system variable).
6
on
the
OCT system variable (see Chapter
70
Page 75
(
The,;
Monadic (One-Argument) Form
Function:
There
is
Less
no
monadic form.
Than
or
Equal
To
[~
)
Dyadic (Two-Argument) Form:
The less than
to
argument vectors, or other arrays. The arguments must arguments have
the same shape result:
or
equal to function result
B;
otherwise, the result
is
a scalar or any single-element array. Arguments of the same shape
Less
:I. :I. :I.
-::···"
.,.
JIO..
0
o
5.1-
o 0
1
If
one argument
as
same of the multielement array:
that of the other argument. The
is
a scalar or a single-element array, the shape of the result
Than
or
Equal To
is
1 when argument A
is
O.
The arguments can be numeric scalars,
single
A~
B
is
less
be
the same shape, unless one of the
element
is
applied to every element
than or equal
is
the
c
--"'
r.{~~·2
3p:J.
13
1
2 3
I.~
5 6
3~;B
0
0
1
:I.
1
1.
Note: The result of the
5 for information on the
2
~
function depends on the
OCT
system variable).
~5
I.)
ll·
:3
OCT
system variable
(see
Chapter
71
Page 76
The F Function:
Monadic (One-Argument) Form
There
is
Not
Equal To
no monadic form.
CD
Dyadic (Two-Argument) Form:
The
not
equal to function result
otherwise, the result vectors, or other arrays. The arguments must be arguments
have
is
a scalar or any single-element array. Arguments
the
same shape result:
Not
Equal
is
is
O.
The arguments (numeric or character) can be scalars,
Ot-5
1
o
'A't-'A'
()
:I.
"':l
···:3t-~.:;,:I.
argument.
o 1
If
one
argument
same
as
that
of
the
multielement array:
~5
,
:I.
:1.
is
a scalar or a single element array, the shape of
of
the
other
To
A'/=B
1 when argument A
the
same shape unless one of
()
'"4·
The
single element
is
not
is
equal
of
the same shape
the
applied
to
argument
result
is
to
every element
8;
the
the
72
'A'¢'ABACADAEAFAG'
o
:I. 0 :I. 0 :I.
Note:
If
the arguments are numeric, the result of the
OCT system variable (see Chapter 5 for information on
The
not
equal to function can also be used
in
this manner,
the
Operator~---
0
value of
:I.
0 1 0
the
arguments must be either 0
Exclusive Or Table
:I.
as
an exclusive or function. When used
_Argument
~function
the
depends on the
OCT system variable).
or
1:
A
Page 77
73
Page 78
Dyadic
Mixed
Functions
AlB
or
A/[I]
B or
AlB
Name Result
Compress
The elements from B to
the
1's
in
A.
that
correspond
."
..
J
A\B
or
A
\[lJ B or
A~B
AtB
Ai-B
AlB
A¢B
or
A¢[I]
B by
orAsB
A~B
A?B Deal The
Expand
Take The number
Drop
Index
of
Rotate
General ized transpose specified
is
B by A; 1 B;
are
The are dropped from
The first occurrence
in
The elements
are rotated the
The
are randomly selected from selecting
expanded
in
A inserts an
a 0
in
A inserts a 0
taken
from
number
B.
A.
If A is
elements
coordinates
by
number
the
to
the
format
of
elements specified by A B.
of
elements specified
B.
in A of
of
B are rotated as specified
positive,
to
the
left.
of
B are
of
B interchanged as
A.
of
elements specified by A
same
number
specified
element
or
blank element.
the
the
elements
If A is
rotated
to
B,
twice.
from
by
A
elements
of
negative,
the
right.
without
B
74
A.LB
ATB
AEB
AffiB
AlB
Decode The value (base value)
Encode The representation ( representation)
Membership A 1 for each
Matrix Solution
divide equations with coefficient matrix
Format
the
argument A.
the
argument
found
not
(matrices) B and right-hand sides A the more sets
Argument B converted
array in
argument
of
argument B expressed
number
number system specified by
found.
least squares solution
system specified by
of
A.
element
in
B and a 0 for each
to
one
or
more sets
of
linear equations.
the
format
A.
specified
argument B in
of A that
element
of
to
one
to
a character
by
can be
linear
in
or
or
"I
Page 79
Note:
The
mixed functions
(see
Operators
coordinate
coordinate
index
entry
coordinate
index value row
coordinate
is
not
specified, overstruck with assumed (unless an index value was also used). When a plied
to
ments
in
later
in
of
an array. This
to
which
can be
from 1 to
(first coordinate) has an index value
of
2, and so on. A matrix, for example, has an index value
and an index value
the
last
the
function
a specific coordinate,
the
specified
reverse,
this chapter) reduction and
the
mixed
coordinate
coordinate.
is
done function
the
number
of
symbol
the
operation
rotate,
(columns)
For
compress,
by
using an index
or
operator
of
coordinates
2 for
the
or
operator
takes
example; assume
scan
is
of
1,
column
is
assumed. If a - (minus) symbol
symbol,
place
and
expand,
can be applied
entry
[I] which indicates
applied.
the
coordinate.
function
between
The
in
the
array;
next
coordinate
the
first
you
have a 3-rank array:
and
the
operators
to
a specific
value
of
the
the
leftmost
has an
of
.1
for
the
If an index
coordinate
or
operator
corresponding ele-
is
entry
is
ap-
the
is
(~
('
• When
• When
• When
The p Function:
Monadic (One-Argument) Form:
The coordinate argument
the
first coordinate (planes)
corresponding elements
the
second
the
corresponding elements
the
third
tween
the
shape
function
of
can be any variable
coordinate
coordinate
corresponding elements
Shape,
the
(J • ABeD ·
Reshape
result
argument, which indicates
1+
"'1
A-
••
(,J
:l
2
pl.
2 3
~3
A~"2
A
3
2
1
l~
6
\J
pA
3
2
in
each plane.
(rows)
in
each row per plane.
(columns)
(Structure)
Shape
p B
is
the
shape
or
constant:
....
1-------
is
specified, the
is
specified,
is
specified,
in
each column
of
the
argument; it has
the
A Vector with
operation
the
the
per
length
operation
operation
plane.
one
of
that
Four
takes
place
between
takes place between
takes
place be-
element
coordinate.
Elements
for each
The
('
The
shape
function
coordinates. An
p2
p'T'~
applied
empty
to
a scalar yields an
vector
is
indicated
Blank Result Lines
empty
vector, since a scalar has no
by
a blank result line:
75
Page 80
The instruction p p B yields the rank (shape of the shape, or, number of coordinates)
B:
of
B~2
2 3p'CARBARFARARE'
B
CAR BAR
FAR
AI~E
pH
2
2
~5
ppB
:1
Dyadic (Two-Argument) Form:
The
reshape
element(s) from argument
array array, the elements are repeated. are required to Argument A must number rank, of the result. Argument B can elements of argument A are nonzero, then B cannot
in
row
of
elements
function forms
order.
fill
the array, only the required number of elements are used. be
Reshape
an
B.
If
there are not enough elements
a nonnegative integer or vector of nonnegative integers. The
in
argument A
(Structure) A p B
array of the shape specified
The elements of argument B are placed into the
If
there are more elements
is
equal to the number of coordinates, or the
be
2
:3
1
2
5 6
2p'ABCDEFGH'
AB
en
EF
GH
5(.)
• MOUSETRAP'
MOUSE
p
3
l+
:l.23
:1.2:3
1.23
123
123
:1.
23
12~5
:1.
2:'~
:I.
:~3
1,23
:1.23
1~~:3
12~5
A~~
2p1
2 3 ~ 5 6 7 8
A
1 2
3
4-
5 6
'7
B
by
argument A
in
argument B
in
any variable or constant.
be
an
empty array:
using
to
fill
the
argument B than
If
all
of the
76
1.
2 3
I.~
!7i
6
6p·
..
Page 81
(
The,
Function: Ravel, Catenate, Laminate
Monadic (One-Argument) Form: Ravel
The
ravel
function results in a vector containing
argument B
in
row order. Argument B can be a scalar, vector, or
vector contains
1 2
~3
1+
is
an array,
the
A~2
A
the
elements
same number
2
2pl
5 6
'7
8
IA
:1.23'+5678
B~"2
:3
p • ABCDEF ·
B
ABC
DEF
IB
ABCDEF
o
,8
the
elements
in
the
vector are taken from argument B
other
of
elements as argument
2 3 ~ 5 6 7 8
of
argument
array. The resulting
B:
B.
If
(
c
Dyadic (Two-Argument) Form: Catenate
The function when
the
is
catenate when
[I] entry
is
a fraction.
the
or
[I]
Laminate
entry
(index entry)
A,
[I]
8
is
an integer and laminate
77
Page 82
Catenate (The Index [I]
an existing coordinate. (See to
join
two
items along a new coordinate). The index
coordinate
array. If no index [I]
sizes can be joined, providing
same (see Catenation
is
expanded.
A~:I.
[u··7
AlB
-,
L~
1
9 A+-2
B+-2 A
3
1 2
5 6
'+
B
7
8
10
:L
1.
:1.2
AlB
2
1
L~
5
AI[1JB
1
2
L~
5
7
8 9
1.0
11.
:1.2
A,
,.)
1
.:-
.::'
4
\.I
A}[~.~]10
')
t:_
:1.
I'"
I.f-
,,)
10
:1.
0
20
30
I')
1
1:-
5
'+
Entry
1+
9
5
3p1 3p7
9
~3
10
6
:3
6
[2Jf.t
3
10
6
~5
10
6
20
20
:3
6
Is
an Integer):
the
The
is
specified,
in
Chapter 3):
~5
I)
t:"
8
7
8
II
..,
8
1:1.
20
30
..
The
catenate function joins
laminate function following
index
entry
must be a positive scalar
the
last coordinate
the
lengths
of
the
coordinate
1::'
t)
,.1
3 4
12
1.0
11.
9
9
12
9
1
r)
~-
C:I.JA
two
for
a description
[I],
if given, specifies which
or
one-element
is
used. Matrices
not
specified are
items along
of
of
unequal
the
how
/
,1
"~",
78
Page 83
Laminate (The Index [I] Entry
creating a new coordinate, specified by
If
tive fraction. the
first coordinate; if
placed between existing coordinates 1 and 2 (the new coordinate
ways has a value (or length)
new coordinate 3 matrices are laminated:
the
in
is
a Fraction):
index
entry
the
index
of
the
shape vector (see
The
the
is
between 0 and 1,
entry
is
between 1 and 2, the new
2).
The
following chart shows
the
laminate function joins
index
entry
following examples) when
two
[I] which must be a posi-
the
new coordinate becomes
coordinate
that
is
the
positions
two
items by
added
of
3 by
is
al-
a
Index Value
.1
- .9
1.1
- 1.9
2.1 - 2.9
Lamination requires either of
the
arguments
:I.
2 3
'+
~.:;
7 B
:I.
1.
'+
'+
77
:1.
LI·
is
a scalar:
A~3
B~3
I~
6,
9~
B
22
:3:~
~::; ~.:;
66
B8 ,99
C~"A}
.,
r
2 3
~5
I.>
3pl 3pl1
I:
I 8:1B
7 B 9
Positions Coordinate Vector
that
arguments A and B are
of
3
3 3
New
in
3 3
2 3 4 5 6 7 8 9
22
33
~~
55
the
Shape
3
the
same shape
66 77
88
99
or
that
one
c c
2
1.1
'4·4
77
3
22
1.':'1::'
\."J
B8
:3
(o)e
3:3
66
99
Shape Vector
79
Page 84
1.
:1.:1.
7
."'''.'"1
( (
2
~3
3
C~··i~
C
2
:~
22
~5~5
B
<.»(.»
BB
(.)C
II
-----------Shape
~5
Cf-A,
...
r-
:I.
:I.
1.
,.)
r)
.-:'.A
..
2
··X
,:>
~3:~
I.f.
I+I.~
5~:.i
~5
6
c>6
77
7
BB
8
99
9
pC
,.)
II
k
3
}
I::
:1
..
~::.i:l
B
/
"'
9
Vector
[2.
:I.:lB
Shape Vector
The following examples show the result when the two matrices are catenated instead of laminated:
AI[lJB
1.
2
:5
1+
5
6
"7
8
9
:1.:1.
22
~53
1::'1::.
.J
•.
1
4-
"7
J
B8
A,[2JB
,.)
.:..
1:,"
.. I
8 9
66
99
:3
6
1
:1.
22
.::
.
.::.
I.I·I~
.
•• J ...
J
77
BB
33
66 99
4·4-
77
in
the preceding example
80
Page 85
The I Function: Compress
CD
(
(
Monadic (One-Argument)
See Reduction later
Dyadic (Two-Argument) Form: Compress
The
compress function selects
to
1 's in
argument
values 0
must have
• One
When the (columns) rank
or
1.
the
of
the
Argument B is A
must
be
argument B is
coordinate
is
assumed. If
of
the
result
")
.....
1
3
Forra
in
this
chapter
elements
A.
Argument A must Argument same
arguments
the
that
:I.
()
B can be any scalar, vector,
number
a multidimensional array; same as
a multidimensional array,
is
is
the
0
:1.
(}
of
elements unless:
is
a scalar
the
length
acted on. If
the
AJ.B
same as
()
:l./l
2
")
OIl
..:..
the
~:~
:3
or
the
form
under
APL
Operators
A/Ul B or
from
be a logical scalar
single-element array.
of
the
index
is
rank of argument
2
AlB
argument B corresponding in sequence
then
the
argument B
the
[I] index
entry
is
used,
the
first
I.J.
..
or
AfB
or
or
other
number
coordinate
omitted,
coordinate
B:
/Blank
vector
having
the
array. Both arguments
of
elements
entry
the
in
being
acted
is
used
to
last
coordinate
is
assumed. The
argument
on.
specify
Display Line (empty array)
(".
e
C~'
1
c'
·_1
9
1.
<"i
2 3
6
:1.
0
:l
9 10
2
6
10
:I.
!5
9
")
.:-
(~)
j.O
...
)
..:..
10
"7
11.
t·)
.:-
:5
"7
11
2 3
I.)
10
[H<5
B
:3
"7
11
:I.
0
:5
j.l
0 1
0
1
3
11
0 1 1
liB
'7
:I.
:1.
OIB
I.J.
f>:I.
2
I.J.
B
:1.
:~
:l./[:I.::tB
I.J.
\
j
':>
.....
O/r:2::tB
:1.
\
liB
j
')
......
O/S
8
1
':>
....
:3
I.J.
,::-
,.J
I.>
"7
10
B 9
The the argument
The the argument
Blank Display Line
:I.
II
first
coordinate
first
and
A, are selected .
second
second
A, are selected.
::.~
(rows)
third
rows, as specified by
coordinate
and
third
columns, as specified
(empty
is
specified;
(columns)
array)
is
specified;
by
81
Page 86
The \ Function: Expand
Monadic (One-Argument) Form
CD
~I.
J
See Scan later
Dyadic (Two-Argument) Form: Expand A
The
result of
argument
in
this
the
expand function
A.
Each 1 in
chapter
argument
under
is
A selects an
APL
o in argument A inserts a 0 (or blank
must be a logical scalar scalar, vector, same number a multidimensional array, argument A must have length
When argument B that
is
assumed. If
If
argument B
the
number
array,
the
or
of
of
the argument B
acted on.
the
is
of
1's
rank
of
1.
")
.:..
3
0
1
B~"2
B
3
1.
2
1:."
1+
.J
6
t
"y
,:)
:L
~~
()
0
0
5 b
l 1
")
3
0
.:..
1
c:-
I.~
O 6
.J
1
")
1
It:
••
3
{}
0 0
6
4-
5
other
1's as
is
an array,
If
the
A~B
is
a scalar
in
argument
the
result
:1.
0
0
3~)1
{}
l\[lJB
0
l\.B
0
or
vector having
array.
If
argument B
the
number
coordinate
index
used,
or
1
of
the
[I]
entry
is
then
the
single-element array, it
A.
If argument B
is
the
same
")
I:'.
0\1
I")
.,.
...
4-
3
\
1\[2JB
'\
Operators.
\[1]
B
or A \B
argument B expanded as indicated by
for
character data)
the
values 0
is
elements
being acted on.
index
entry
omitted,
first coordinate
as
the
or
A~B
element
a vector, argument A
the
rank
from argument B and each
in
the
result. Argument A
or
1. Argument B can be any
in
argument
the
is
used
last
is
is
not of
B.
same
number
to
specify
coordinate
is
assumed.
extended
a scalar
the
B argument.
If argument B
to
or
must
of
1's as
the
coordinate
(columns)
a length equal
single-element
3
5 6
The first coordinate (rows) expanded; a row tween
the
first and second row.
The second coordinate (columns) expanded; a column between
the
second and third columns.
have
the
is
the
is
to
is
inserted be-
is
inserted
is
is
82
Page 87
The
4>
Function: Grade Up
The
~symbol
OJ
is
formed by overstriking
OJ
the
11
symbol and
the
I symbol.
Monadic (One-Argument) Form: Grade Up
The
grade up function result
argument B in ascending order. of
the
smallest smallest element in argument When
two
tion
in
the occurrence appears first in same as
"~)
.....
'+
element
or more elements
yector determines
the
number
1
.$3
C'
.J
of
1-
3
4tAt-6
-5
6
2
4-
ib:3
L~
:I.
6
The
following example shows
tor
into ascending order:
At-:l.~
A
11
12
1~
3
1
3
6
r>
5
.:-
[¢.AJ
15
is
in
argument
in
their
the
elements
I!!'
...
1 2
~5
2
:I.
:~
12
16
16
the
index values
That
B,
and so on. Argument B must be a numeric vector.
the
vector have
order
output).
in
the
I.f.
1+
:I.
::!
~5
how
the
18
:1.8
~B
that
would select
is,
the
first element
B,
the
next
element
the
in
the
result (the index value
The
number
argument:
:~
grade up function can be used
15
1:1.
of
the
is
the
index
same numeric value,
of
elements
the
result
in
the
elements
is
the
of
the
next
their
of
the
result
to
sort
of
index
posi-
first
is
the
a vec-
The result because for an example
Note:
ter 5 for
Dyadic (Two-Argument) Form
There
of
the
of
the
The
result
information
is
no
dyadic
grade up function
way equal elements are handled; see
uSing
the
of
the ~ function depends
on
form.
is
not
the
reverse
of
the
grade down function
The
'W
Function: Grade Down
grade up and grade down functions with equal elements.
on
the
the
010 system variable).
010 system variable (see
Chap~
83
Page 88
The
'I'
Function:
The
1 symbol
Monadic (One-Argument) Form: Grade Down 1
The
grade down
of
the
numeric vector
of
the
result
the
index
be
a numeric vector. When numeric value, index value of
elements
~)
3
:5
:1.
5
2
in
of
the
1 5
:1.
Grade
is
is
the
the
their
the
~:'5
Lf.
\f1Af'6
6 2
~:3
~5
Down
formed
function
of
index
next
largest
position in
first occurrence appears first
result
is
the
~:)
:I.
11
"M
"
......
:3
6
LI·
6
(]]
by overstriking
result
Js
the argument 8 in of
the
largest
element
two
or
the
same
as
I')
1+
,.-..
1+
:l
5
1::'
,J
2
1-
CIJ
the
index values
descending order.
element
in
argument
more elements
vector determines
the
number
:3
Vsymbol and
that
would
in
argument
8,
and
in
the
their
in
the
output).
of
elements in
the
I symbol.
select
the
elements
That
is,
the
first
8,
the
next
element
so on. Argument 8
vector have
order
in
The
the
argument:
the
same
the
result (the
number
element
is
must
of
The
following example shows
vector in descending order:
A~14
f~d::
18
16
15
The following example shows up
and
grade
down
A~M!:;
A
r)
c'
...
1
7 3
A
••
B
12 16
~A:I
1Lf.
12
functions:
")
A.. 8
LI·
:1.0
,A
1+
1 6
3
7
B
6 1
how
the
grade
down
function
18
15
11
11
how
equal elements are handled when using
:5
7
:I.
1+
:5
2
If
:3-
8
:~
7
10
2
1
Positions 2
and
can be used
9 and 5
to
and
sort
the
10
grade
a
are equal.
84
Page 89
(
Because first) not
the indices
for
both the grade down
the
reverse
of
the grade up function:
for
the equal elements
A[,A:J
10
8 7 5
1 2 2 3 3 4 5 7 8
~
3 3 2 2 1
A[~AJ
and
are
in the
same
grade
up function, the grade down
10
order
(first
occurrence function
is
(
Note: The result
for
ter 5
Dyadic (Two-Argument)
There
information on the 010 system variable).
is
no dyadic form.
of
the f function depends on the
Form
010
system variable
(see
Chap-
"
c
c
85
Page 90
The + Function: Take
Monadic (One-Argument) Form
There
is
no monadic form.
CIJ
Dyadic (Two-Argument) Form: Take
The
take function result
from
argument
must be a scalar
be
a scalar. Argument A must be a vector with an
of
argument
are
taken; A specifies more elements is
padded with
value
of
B.
or
B.
When argument A
when argument A
O's
A:
:~
"':~t:l,
7t:l.
t
23'+5
"'7tt
00
1
:~34,5
B~3
is
the
Argument B can be a scalar, vector,
vector
of
integers.
is
than
(or blanks for character data). The shape
2
2 3
I",
00
2 3
'+
~pl
2 3 ~ 5 6 7 8 9
B
'")
:I.
!:5
5
9
:1,
'1
.:..
6
A"
6
10
3
'7
~5
"1
1.1
2
~5tB
'+
8
:1.2
At
8
number
is
positive,
negative,
the
number
~3
5
of
elements specified
If
argument B
the
last elements are taken.
of
is
element
the
first elements
elements
by
argument
or
other
array. Argument A
a vector, argument A must
for each coordinate
of
argument B
in
argument
of
the
10 11
If
argument
B,
result
12
A, taken
the
result
is
the
86
1-
'.~
7
10
1
1
7
1
2
5
'+
"1
1.0
1t
2
5
B
1:1,
3
6
8
Bf-2
B
3
6
9
:l2
1
1
")
.:..
1 2
"'1
9
:1,2
1-
,')
.:..
:L
1tB
3tB
2
3~)
tB
3tB
1.
2 3 4 5 6 7 8 9 10
:1.1
12
Page 91
The + Function: Drop
Monadic (One-Argument) Form
There
is
no monadic form.
OJ
(~"
Dyadic (Two-Argument) Form:
The
drop function result
of
elements specified
other
array. Argument A must be a scalar if argument B
When argument B
nate
of
argument are dropped from dropped:
by
is
an array, argument A must have
B.
When argument A
the
result; when argument A
3J.l. 2 3
B~3
~p1
B
1+
:5
2
1
1::-
...
9
7
1l.
1
5
1 6
2
6
10
f.)
12
7
11 1
2.J.B
1
--1
a
~~
-2.J.B
Drop
A+B
is
the
remaining elements
argument A
is
dropped. Argument B can
is
positive,
of
the
is
negative,
argument
is
one
element
first elements
2 3 ~ 5 6 7 8 9 10 11
B after
be
a vector
a vector.
for
each coordi-
of
the
last elements are
12
the
number
or
argument
B
c
c
87
Page 92
The 1 Function: Index Generator, Index
of
OJ
Monadic (One-Argument) Form: Index Generator
The index generator function result ing
with the index origin (see
be a nonnegative integer
that
is
a vector containing
010
system variable
is
either a scalar
\5
1.
2 3
Lf.
5
A~"
\ 6
A
12~3Lf.56
~:i
+
,5
..--
Each
of
the
generated integers
6 7 B 9 lO
Dyadic (Two-Argument) Form: Index
The
index
of
function result
the
element(s) in argument a scalar, vector, or array. The result in
argument B
is
ment
cannot
one greater than
be found
the
of
A 1 8
is
the index
B.
Argument A must be a vector. Argument B can be
in
largest index of A (010 + pA):
of
is
the same shape as argument
argument
18
the
in
Chapter 5). The argument can
or
a single-element array.
the
first occurrence
A,
the value
of
first B integers, start-
is
added
to
5.
in
argument A
B.
If
the
element
the
index for
that
of
ele-
2
.....
41-----------------
'ABCDEFG','C'
3
2
6
1 9 1
9
9
Note: The result of the 1 function depends on
5 for information on
8
1')
\.J
.:..
:~
:1.
9 2
A
...
1
:I.
A\22
")
.:..
A."9
3pl
B~"2
B
A\S
22
:33
Lf.LI·
t)
B 2
8
9 8
1
the
010 system variable).
5~5
Lf.
B
C'
,J
2
Second Element
the
010
system variable (see Chapter
88
Page 93
The
4>
Function: Reverse, Rotate
OJ
m
("
(
(
The ¢ symbol
form
of
symbol.
Monadic (One-Argument) Form: Reverse
The
reverse
expression.
is
formed by overstriking
the
function symbol
function reverses
is
9,
formed by overstriking
the
elements
<p
the
[I]
B
of
0 symbol and
or
<f>;B
or
aB
argument
B.
the
I symbol. A special
the
0 symbol and
Argument B can be
the
-
any
89
Page 94
When argument B specify the coordinate ordinate (columns)
is
acted on:
I.J. 3 2 1
is
a multidimensional array, the index entry [I] can be used
is
<1>1
2 3
<I>'I...IVE'
EVIL
~5
2 1
f.)
5
I~.
A~2
A
SAVE
MUCH
M()I~E
TIME
(~r::I.]A
MORE TIME
SAVE
"
MUCH
(J>[2::tA
MUCH BAVE
TIME
"
MORE
(~[3]A
EVAS HCUM
\
EROM
Et1IT
(DA
EVAS HCUM
that
is
acted on.
acted on.
2
'--------The
~-----The
~-----The
If
the
1+
I+p
'SAVEMUCHMORETIME'
If
the index entry
sB
form
is
used, then the first coordinate
first coordinate (plane)
the planes are reversed.
second coordinate (rows)
the rows
specified; the columns
reversed.
The last coordinate
in
each plane are reversed.
third coordinate (columns)
is
is
omitted, the last co-
is
specified;
is
specified;
is
in
each plane are
acted on.
to
90
EROM EMIT
MORE TIME
SAVE MUCH
"
sA
"
'-------The
first coordinate
is
acted on.
Page 95
Dyadic (Two-Argument) Form: Rotate A
<1>
[I]
Bar
A<1>B
or
AsB
(
(
c
The rotate function rotates the elements specified by argument argument B are rotated the
elements are rotated
can be any expression. The shape
When argument B specify the coordinate
ordinate (column) is
acted on.
If
argument B If argument-B argument A
the
number by 4 matrix (each row has four elements) and must have four elements:
3
4-
5
31+~5:1.2
is is
is
a vector, the number
of
elements
2<1>:1.
5
'!2:1
:I.
2 3
'7(~:I.
B~3
A.
If
argument A
to
the left (rows), or upward (columns). If A
to
the
right (rows), or downward (columns). Argument B
is
a multidimensional array, the index entry
that
is
acted on. If the index entry
is
acted on. If the
a vector, then argument A must be a scalar a matrix, then argument A must be a scalar
in
the coordinate being rotated. For example, if B
2 3
5..--
2 3
I.J.
5
2 3
I.~
5
4-p
1 2 3 ~ 5 6
B
:I.
2
:5
56'7
9
:1.0
52'7
9 6
1.
10
:I.
6
11
:1.2
:I.
6
:1.:1.
12
527
9
1 10 3
-1.
()
9
:I.
5
1.
1
o
2
"7
o
2 3
"7
:t.
6:1.1
A~"~"1
f~
"':1.
A(~[1]B
2 1.l B
6
0
1+ 8
:1.1
()
~:
2$r.1JB
1.1
~
3
2<1>[2:1B
:I.
:3
I.~
\
!7j
B
9
:1.0
2<J)B
:I.
5
L~'
B
9
:1.0
1
2eB
0
12
\"-----The
LI·
S
01.2
-2
3
12
'7
L~
i
'-------The
'------The
of is
positive, then the elements
of
the
result
AsB
form
of
elements
(2--1~
The first coordinate (rows) therefore, the rotation
therefore, the rotation
argument B the number
is
the same as
is
omitted, the last co-
is
used,
then
or
or
in
argument A must be
the
row coordinate
3 4 5
'7
8 9
10
r:: r 1
J
second coordinate (columns)
last coordinate
first coordinate
lOJJ
is
of
is
that
of
argument
[I]
can be used
the first coordinate
single-element array.
vector. When
is
specified, A
11
:1.2
is
is
between rows.
[:2
is
between columns.
acted on.
is
acted on.
positions
of
negative,
the
same
is
a 3
specified;
is
specified;
B.
to
as
91
Page 96
If
argument B is
rank
that
be
the
same as argument B less
B~":5
~~
an N-rank array, argument A
is
one less
~3
p \
27
B
"1.
...
2
I!!'
.J
B
)
6
9
:1.2
:I.
~;
1.8
11.
2'+ 27
1-
'+
7
1,1-
10
:1.3
1'+
:L6
:1.7
19
20
22
23
2~5
26
pB
333
A~3
3pl
0 0 0 2 0 0 0 0
()
A
0
()...----
_____
The shape as
argument
1
o 2 o 0 0 acted on.
pA
3 3
A<lH:
1:lB
:1.0
"7
19
13 16
1
'1
,.)
..
,
25
If
"7
1
10
:1.3
:1.6
19
")
.:
..
1")1::-
...
23
1:1.
17
20
1'+
21.)
:1.7
1:1.
1'+ 20 21
'1
I!.
2:5
....
1
26
2 3
8
...
,
2
I::'
,J
8
'---
6
The first coordinate (planes) therefore,
9
1,2
15
:1.8
The first in each plane rotated between planes.
2l 2'+ 27
A<I>[2JB
3
6
L
9 The second coordinate (rows)
12
:I.
~5
:I.B
2'+
27
therefore,
1
0
0
than
the
rank
of
argument
the
coordinate
of
argument A must be
B less
the
coordinate being
the
rotation
element
is
one
position 0 2
the
rotation
/,------
R
otation
0
0
2 0
0
he first plane t
Rotation between rows
he second plane
t
Rotation
0
he
t
must
B.
The
being
the
is
specified;
is
between planes.
0 0
0
0
is
specified;
is
between
third
the
between rows
between rows
plane
be a scalar
acted
same
rows.
Argument A
or
an array with a
shape
of
argument A
on:
~ArgUment
The middle element
plane positions between planes.
of
of
of
in
is
rotated
must
A
each
two
92
Page 97
(
The
lsi
The ~ symbol
Function: Transpose, Generalized Transpose m
is
formed
by
overstriking the 0 symbol and the \ symbol.
CTI
(
Monadic (One-Argument) Form: Transpose
The
transpose
any expression. the
function:
function
~'ABCD'
reverses
If
argument B
the coordinates
is
a scalar
ABeD
B~"2
B
2 3
...---------
c:.
,.I
6
~B
4
...
...----------
c:-
~
6
B-t
B
"
.:..
6
10
II
..
2
3
'7
:l
:1.
:L
'.~
1
2
3
~B
of
argument B. Argument B
or
vector, the argument
2-row 3-column matrix.
3-row 2-column matrix.
is
unchanged
can
by
be
("
/
('~'
c
2
6
10
3
7
1t
4-
8
12
1
~:;
jn
"
2:'5
~B
16
20
'1
2ll-
1'4·
1t3
22
1
1
4,
18
22
j
1::-
,
,J
~
:1.9
::.~3
16
20
24·
The coordinates are reversed.
93
Page 98
Dyadic (Two-Argument) Form: Generalized Transpose
A~B
The generalized
specified by argument A. Argument B can be any expression. Argument A must
be a vector or a scalar, and must have an element for each coordinate also, argument A must contain all specified. For example, would be 2 1:
Hf·2
transpose
~3~)
:I.
function interchanges
the
integers between 1 and
to
transpose
the
rows and columns of a matrix, argument A
the
coordinates of argument B
of
the
largest integer
argument
H
:I.
2
:~
I::'
I.~
••
J
6
1"\
.:.:
:I.~B
I.J.
1
11
AM
5
3 6
To
transpose
would be 1 3 2:
1
t::"
\J
9
13 :1.7
21
:I.
2
3
l~
13
:1.4·
15
11.>
B~"2
B
I")
tI..
6
10
1
1
.1.
1B
22
1.
r:
..J
~)
7
B
17
:LB
19
20
the
rows and columns
I.J.
f) \ 2
~5
M1.
..
)
"l
B
:I.
:I.
12
:1.
!7;
:1.1.>
20
19
21.1·
23
3
2~B
9
10
1:1.
12
2:1. 22
23
~~l~
of
a 3-rank (three-coordinate) array, argument A
1
.J.
An array with
The second and third coordinates have been interchanged, forming an array with columns.
two
planes, three rows, and four columns.
two
planes, four rows, and
three
as
B;
94
Page 99
The?
Function: Deal
Monadic (One-Argument) Form
the
See
Dyadic (Two-Argument) Form: Deal A?B
The
(depending arguments must be single positive integers. Argument A must be less than to
Roll function earlier
deal
function randomly selects numbers from 0 through 8-1
on
the
argument
8;
CD
in
this chapter under
index origin),
argument A determines
without
Primitive
selecting the same number twice.
how
many numbers are selected.
Scalar
Functions.
or
1 through 8
80th
or
equal
I~'
(
..
/
c
95
Page 100
The
.L
Function: Decode
Monadic (One-Argument) Form
There
is
no
monadic
form.
(Base
Value)
CD
Dyadic (Two-Argument) Form: Decode
The
decode
system specified by decimal
function
number
10
result
is
the
argument
system (base 10):
10
10
A.
1011
1776
The
following illustration shows
Argument A (number
10 10
,L..--+.L...--..Lt-----'--Ten
Argument B
is
7
system) specifies
10
10
equals one unit to
a vector with these values:
7
6
A.l
value
For
example,
how
it was done:
units
the
B
of
argument
7 7 6
the
in
each
left.
B expressed in
to
convert
following:
of
these positions
of
the
1776
next
the
to
its value
position
number
in
the
The result
x10x10x10
The
arguments
the
other
rank
of
the
is
the
same as doing
x10
x10x10
must
argument
larger
argument
the
following:
:1=
can be a scalar, vector,
6
=
70
=
700
~~The
=
1000
1776
be numeric. If
minus one.
one
The
units position always represents itself.
value
in
the
next
position
by
the
The
value
the
by and so on.
argument
or
other
rightmost value
in
the
two
rightmost values
is
a scalar or single-element array,
array.
in
next
position
The
result will have
argument A.
in
is
multiplied
is
multiplied
argument A,
the
96
Loading...