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 #107 background imageLoading...
Page #107 background image
(
(
(
(
PUT file ref
{arith-ex
p
} [
{arith-ex
p
}]
...
, char-exp , char-exp
PUT
The PUT statement allows you
to
write the values
of
specified variables into a partic-
ular file. The file must have already been opened with an OPEN statement. The
syntax
of
the
PUT statement
is
as
shown:
PUT
file ref
{arith-ex
p
} [
{arith-ex
p
}]
...
'char-exp
char-exp
where:
file
ref
is
FLO
to
FL9
to
identify the file into which variable values will be written.
exp are function references or subscripted array references representing
the
values
to
be written. Only one value
is
required.
If
more than one
is
specified,
the
values
must
be
separated by commas.
When
a PUT statement
is
executed, the specified scalar reference value
is
entered
from left
to
right into a buffer for the specified file, beginning
at
the current file
position. The file
is
written sequentially so
that
the first value entered by
the
PUT
statement
will
be the first value assigned from
the
file when
the
file
is
referenced
in
a GET statement. When
the
buffer becomes full. the
cont~nts
are written
out
as a
record. Tape records are 512 bytes
in
length.
As
many bytes as possible are used
in
each record.
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
PUT
A file currently activated
as
an
input file cannot be specified
in
a PUT statement.
It must be closed, then reopened for
output,
or
a RESET END statement must
be
issued.
If
space
in
the
output
file
is
exhaused before all values
in
the
output
list are
placed
in
the file, program execution
is
terminated.
A PUT statement referring
to
a currently closed file causes program execution
to
be terminated.
103

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