EasyManuals Logo

IBM 5100 Basic Reference Manual

IBM 5100
187 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 #50 background imageLoading...
Page #50 background image
46
Arrays can be either one-
or
two-dimensional. A one-dimensional array can be
thought
of
as a row
of
successive data items. A two-dimensional array can be
thought
of
as
a matrix
of
rows and columns. Figure 6 shows a schematic repre-
sentation
of
both types
of
arrays.
One-Dimensional Array Named A
A(1)
A(2)
A(3)
A(4)
Two-Dimensional Array Named 8
8(1,1) 8(1,2)
8(1,3)
8(2,1)
8(2,2) 8(2,3)
8(3,1)
8(3,2) 8(3,3)
8(4,1) 8(4,2)
8(4,3)
Figure 6. Schematic Representation
of
One- and Two-Dimensional Arrays
Each element
in
an array
is
referred
to
by the name
of
the
array followed by a sub-
script
in
parentheses, which indicates
the
position
of
the
element within
the
array.
The general form for referring
to
an array element
is:
array name (rows, columns)
where array name
is
the
name
of
the
entire array, and rows, columns are any
positive arithmetic expressions whose truncated integer values are greater than zero
and
less
than
or
equal
to
the
corresponding dimension
of
the
array.
The expression
in
a subscript referring
to
an element
of
a one-dimensional array gives
the position
of
the
element
in
the
row, counting from left
to
right. Thus, the third
element
of
a one-dimensional array named A can be referred
to
by the symbol A(3),
as
in
this example:
A(3)
=
25
./
/

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