EasyManuals Logo

IBM 5100 Apl Reference Manual

IBM 5100
228 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #43 background imageLoading...
Page #43 background image
(
c
The
catenate function
is
useful when creating lists
of
information. Sometimes it
is
necessary
to
use an
empty
array
to
start
a list. For example, suppose
you
want
to
create a matrix named PHONE where each row will represent a 7-digit telephone
number. First
you
want
to
establish
the
matrix, then add
the
telephone
numbers
at
a later time. The following instruction will establish
an
empty
array named
PHONE with no (0) rows and seven colum-ns:
PHDNE~"O
7(.>·~
0
_---I:->H-O-N-E-:
_______
Blank display indicates an
pPHONE
empty
array.
o
'7
Now,
the
telephone
numbers can be added as follows:
PHONE~PHONEIC1]'5336686'
PHONE
5336686
PHONE~PHONE/C1]'4564771'
PI··IONE
~:;:3366B6
45e)I+7'7l
pPHONE
2
\_7
___________
The list of
telephone
numbers
now
contains
two
rows.
INDEXING
You may
not
want
to
refer
to
the
whole array
but
just
to
certain elements.
Referring
to
d,nly certain elements
is
called indexing. Index numbers must be
integers;
they
are enclosed
in
brackets and written after
the
name
of
the
variable
to
which
they
apply. Assume
that
A
is
assigned a vector as follows: A+-11 12 13
14 15 16 17. The result
of
entering A
is
the
whole vector, and
the
result
of
entering
A [2]
is
12 (assuming
the
index origin
is
1; see Chapter 5
for
more information
on
the
index origin).
Here are some more examples
of
indexing:
A~11
12 13
l4
15
16
17
A[3]
A[~:;
:3
7
1]
15
13 17
11
Bi":~
~I.
'+
6 Blank Character
ACB]
1
13
1:1.
:1.4
16
B~'ABCDEFGHIJKLMNOPQRSTUVWXYZ
·
8[4
1
1~
27
1
14
4
27
3
12
1 9
18J
DAN
AND
CI...A
I
I~
C~22
9
18
7 9
14
9 1
BEG]
VIRGINIA
39

Table of Contents

Other manuals for IBM 5100

Questions and Answers:

Question and Answer IconNeed help?

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

IBM 5100 Specifications

General IconGeneral
Release Year1975
RAM16 KB - 64 KB
Storage204 KB tape drive
Display5-inch CRT
Operating SystemAPL/BASIC
ProcessorIBM PALM (1.9 MHz)

Related product manuals