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 #112 background image
RESET
file ref [END1
[.file
ref'
[END]]
...
'108
RESET
The RESET statement allows you
to
reposition an input file
to
its beginning
or
an
output
file
to
its beginning
or
end. The syntax
of
the
RESET statement
is
as shown:
RESET file ref [END]
[.file
ref
[END]]
where:
file
ref
is
FLO
to
FL9
to
identify
the
file
to
be repositioned. The file must have
been previously opened with an OPEN statement. Only one file
is
required
in
each RESET statement. The END entry
is
optional and
is
described below.
When a RESET statement
is
executed. the specified file
is
repositioned so
that
subsequent GET or PUT file references
to
the
file will refer
to
the
first item
in
the
file. When a file
is
opened by an OPEN statement.
the
first item
in
the
file
is
auto·
maticallyaccessible.
When RESET
END
is
specified. the file
is
closed and reopened for
output.
The file
'is
reset
so
that
writing
of
new data begins
at
the
end
of
any existing data
in
the
file.
If
a file
is
to
be
used for input while open for
output
during execution
of
the
same
program, it must
be
closed and reopened with CLOSE and OPEN statements. The
same
is
true
of
files
to
be
used for
output
while open for input
in
the
same program.
Note
About
RESET
If
a file specified in a RESET statement
is
not currently active.
the
file reference
in
the
RESET statement
is
ignored.
Example
In
the
following example,
the
RESET statement (number 100) repositions file FLS
to
its beginning. The GET statement (number 110) then reads
the
first three values
of
file FLS into
A,
B,
and
C,
respectively.
90
GET FLS, X,Y.Z
100
RESET FLS
110
GET FLS, A,B,C
",,"--

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