EasyManuals Logo
Home>IBM>Laptop>5100

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 #134 background imageLoading...
Page #134 background image
MAT
GET
file
ref,
array-name
~rows
Lcolumnsl
I]
[.array-name[(rows
Lcolumnsl
I]] ...
[.EOF
line-numJ
130
MAT GET
The
MAT
GET statement allows you
to
assign a value
to
each element
of
an artay
from a specified file
without
referring
to
each individual array element. The spec-
ified file must have already been opened with an OPEN statement (see
OPENI. You
can also use
the
MAT
GET statement
to
redimension arrays.
The
syntax
of
the
statement
is
as
shown:
MAT
GET
file
ref,
array-name
~rows
Lcolumnsl
I]
[.array-name[(rows
Lcolumnsl
I]] ...
[.EOF
line-numJ
where:
file
ref
is
FLO
to
F L9
to
represent
the
file specified
in
the
OPEN statement.
IJrray-names are names
of
character
or
numeric arrays.
rows, columns are
the
dimensions
of
the
arrays named.
EOF line-num
is
the number of
the
statement
to
which
the
program
Will
branch
when
the
end of the file
is
reached.
If
this branch
is
taken, the file
is
closed and
must
be
reopened before subsequent access.
When a
MAT
GET statement
is
executed,
the
file values are assigned
to
the
specified
arrays row
by
row. The referenced file must have been previously opened
for
input
by an OPEN statement. The file
is
positioned
at
its beginning for
the
first MAT
GET statement, unless
one
or more GET operations were already executed:- Sub-
sequent
MAT
GET statements for
the
same file cause values
to
be assigned from
the
current file position.
If
the
optional rows, coil,lmns entries follow
the
array names
in
the MAT GET state-
ment,
the
truncated integer portions
of
the
expression values are used
to
redimension
the
arrays before data values are assigned from
the
file.
A file can only be activated by an OPEN
statement
and
is
deactivated by a CLOSE
statement
or
at
the
end
of
program execution.
Notes
About
MAT
GET
A file currently activated
as
an
output
file-
cannot
be specified
in
a MAT GET
statement. It must first be closed and
then
reopened.
If
the
input
file
is
exhausted before a specified array
is
filled, program execution
is
terminated unless
the
EOF line number
is
specified.
If
the
redimension specifications are included,
the
rules under Redimensioning
Arrays,
Chapter 3, must be followed.
./
/
/

Table of Contents

Other manuals for IBM 5100

Questions and Answers:

Question and Answer IconNeed help?

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

IBM 5100 Specifications

General IconGeneral
BrandIBM
Model5100
CategoryLaptop
LanguageEnglish

Related product manuals