Sharp MZ-700 Basic Manual page 52

Disk basic interpreter
Hide thumbs Also See for MZ-700:
Table of Contents

Advertisement

51
INPUT # ( )(input)
Reads out data from BRD file.
Format:
INPUT
# <logical number>, «data element number», <variable> [,<variable>, ... ]
Abbreviated form:
1.#( )
Explanation:
• The data of the position designated by the data element number are read from the
file cross-opened by the XOPEN # statement into the designated variable. It
makes no difference if the variable is an array variable.
• The file which reads out the data becomes the file set to <logical number> by the
XOPEN # statement.
• In the same way as for the READ - DATA statements, an error will be generated
if the data and the <variable> data type do not coincide.
• The end of the file data can be detemined by EOF function.
• The data element position is from 1 - n.
Example:
1 0
XOPEN
#2,
11
F D 1 : DATA
11
20
Z =3
30
INPUT
#2 ( Z) , 1 0
40
I F
E OF
( #2)
THEN
80
50
PRI NT
S
60
Z =Z +5
70
GOTO
30
80
CLOSE
#2
Data
ele~:::
:::::i::-=:
11121~ 41516171~191101111121~llt~~
..... When this program is executed, the data at positions
CD,
@ and
@ data positions
indicated by Z in the figure are read in and displayed in order. When the data
end, the EOF # function becomes truth at line 40, and jumps to line 80.
Reference:
PRINT # ( ) (page 52)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mz-2z009

Table of Contents