EasyManua.ls Logo

Sharp MZ-700 - Page 52

Sharp MZ-700
109 pages
Print Icon
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...
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)

Other manuals for Sharp MZ-700

Related product manuals