FINPUT statement
Purpose: FINPUT will input, from a file, lines of comma separated values into a parameter list of comma separated variables in a manner similar to the QBasic INPUT # function. The values in the file can be any of string, integer or floating point data types.
Syntax:
FINPUT hFile, Variable1, Variable2, ...
Parameters:
|
Example:
DIM
P, N!, E#, L!, D$, jOPEN
"TEST.TXT"
FOR
OUTPUT
AS
FP1FOR
j=
1
TO
10
FPRINT
FP1, j ,","
,RND
*
j*
100
,","
,12356789.012345
,","
, j+
10
,","
,"This string has spaces"
NEXT
CLOSE
FP1OPEN
"TEST.TXT"
FOR
INPUT
AS
FP1WHILE
NOT
EOF
(
FP1)
FINPUT
FP1, P, N!, E#, L!, D$" "
, N!," "
, E#," "
, L!," "
, D$WEND
CLOSE
FP1