Epson TF-20 Reference Manual page 19

Hx-20 disk basic
Hide thumbs Also See for TF-20:
Table of Contents

Advertisement

INPUT#
To read a single item of data from a sequential file and assign
it to a variable
INPUT# <file No.>, <variable list>
INPUT# 1, A, B$
<file No > is the number used when the file was opened for
input by the OPEN statement <variable list> lists the
variables to which the data is to be assigned However, the
type of the variables must match that of the data which is
assigned to them The format of the data items in the file will
vary depending on the input device For devices other than
the disk drive see BASIC Reference Manual
When numeric data is input, space, CR (ODH), LF (OAH), etc ,
at the beginning of the line is ignored and any other initial
character is taken as the start or numeric data Numeric data
is delimited by spaces, CR (ODH) or commas [ , ] When
string data is input, space, CR (ODH), LF (OAH), etc , at the
beginning of the line is ignored and any other initial character
is taken as the start of string data When the initial character
is a quotation mark [ " ], all data until the next quotation mark
will be read as a single item of string data When the initial
character of the string is not a quotation mark, that string is
delimited by commas or CR If the end of the file (EOF) is
reached before the start of numeric or string data read, an IE
will occur If EOF is reached in the middle of data read that
data item will be delimited at that point Also, if an attempt is
made to read invalid characters into a numeric variable, or
invalid delimiters are used, a BD error will occur
(See PRINT#, LINE INPUT# and OPEN)
KILL
To delete a file from the disk
KILL <file descriptor>
KILL "B:TEST.BAS"
<file descriptor> must indicate a disk file A KILL statement
should not be executed for a currently open file If it is, the
results cannot be guaranteed A KILL statement is effective
for all types of disk files (BASIC program, BASIC data and
machine language program files)
LINE INPUT#
To read an entire line from a sequential data file to a string
variable
LINE INPUT#<file number>, <string variable>
LINE INPUT#1, A$
LINE INPUT# inputs an entire line of characters (255
characters max ) up to a carriage return from a sequential file
without the use of delimiters and assigns it to <string
variable>
<file number> is the number under which the file was
opened by an OPEN statement <string variable> is the
variable name to which the line will be assigned
LINE INPUT# is especially useful if each line of a data file has
been broken into fields, or if a BASIC program saved in ASCII
mode is being read as data by another program
(See INPUT#)

Advertisement

Table of Contents
loading

Table of Contents