Input - Commodore 2031 User Manual

Hide thumbs Also See for 2031:
Table of Contents

Advertisement

INPUT#

The INPUT# command is used to transfer information from an IEEE device
such as the disk drive into computer memory. INPUT# is valid only when used
in a program and only when referencing a logical file that has been OPENed for
input.
The format for INPUT# is:
Where:
INPUT# may also be used to transfer several strings of data at one time:
Where:
In this format, the data strings must have been separated by carriage returns
(CHR$(13)) at the time they were written tho the disk in order to be retrieved
separately. No single string may contain more than 80 characters if it is to be
INPUT.
EXAMPLE 1:
EXAMPLE 2:
EXAMPLE 3:
For strings longer than 80 characters, the GET# command must be used.
36
INPUT#lfn,A$
or
lfn = a file previously opened using secondary address 15
A$ = a string variable which will contain the data transferred.
A = a numeric variable which will contain the date transferred.
INPUT#lfn, A$,B$,C$
A$, B$, C$ will contain the data transferred from the disk.
*
*
20 INPUT#2,A
*
Input the next data item which must be in numeric form and
assign the value to variable A.
*
*
10 INPUT#8,A$
*
Input the next data item as a string and assign it to variable
A$.
*
*
60 INPUT#7,B,C$
*
Input the next two data items and assign the first to numeric
variable B and the second to string variable C$.
INPUT#lfn,A

Advertisement

Table of Contents
loading

Table of Contents