(
(
(
(
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