EasyManua.ls Logo

Texas Instruments TI-99/4A - Page 150

Texas Instruments TI-99/4A
204 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
Loading...
EOF-End-of-File Function
EOF (numeric-expression)
The
end-of-file function
determines
if
an
end-of-file
has
been
reached
on
a file
stored
on
an
accessory
device.
The
argument
specifies
an
open
file-number (sec ··OPEN").
The
argument
is
the
value
obtamed
when
the
numerIc'expressiOIl is
evaluated.
'i'he
normal
rules
for
the
evaluation
of
numeric
expressions
are used
here.
The
value
the
function
provides
depends
on
the
position of
the
file.
The
values
supplied
are:
Value
Position
o Not end-of-file
+1 Logical end-of-file
-1
Physical end-of-file
A file is positioned
at
a logical end-of-file when all
records
on
the
file
have
been
processed.
A file
is
positioned
at
a physical
eud'of'file
when
no
more
space
is available for
the
file.
This
function
and
the
example
on
the
right
cannot
be
used
with
cassette
tape
recorders.
Its
use
with any
other
accessory
devices
will be
more
fully
explained
in their
accompanying
manuals.
11·130
Examples:
>NEW
>100
OPEN
#2:NAME$,SEQUENTIAL
.INTERNAL.INPUT.FIXED
>110
IF
EOF(2)
THEN
160
>120
REM
IF
EOF
GIVES
ZERO
>130
INPUT
#2:A,6,C
>140
PRINT
A;6;C
>150
GDTD
110
>160
CLOSE
#2
>170
END
User's Refertonce
GUkde

Other manuals for Texas Instruments TI-99/4A

Related product manuals