print # using - formatted write to sequential file
Print # using
writes the values of the expressions in ExprList to the
file specified by FileNum according to the formatting information
contained in StrExpr.
may be any numeric expression.
StrExpr is a string expression which consists of special formatting
These formatting characters determine
the field and the format of the printed strings or numbers.
See print using for a full description of the formatting characters.
ExprList consists of the string expressions or numeric expressions that
are to be printed, separated by semicolons or commas.
print "Enter beginning balance, ";_
"payment, and amount financed, separated ";
input " by commas --->$"; i, j, k
open "datafile1" for output as #1
print #1, using"$$#####.##,"; i; j; k
print "Data written to file..."
and the input
will create "datafile1", storing the userís input amounts sequentially as
$10,000.000 $23.450 $45.260
print #, print using
If FileNum is less than 1 or greater than the maximum number of
open files or if FileNum is not open, a "Bad file number" error occurs.
If FileNum is open for random access, an "Illegal function call" error occurs.
If the number of digits specified in StrExpr exceeds 24,
an "Illegal function call" error occurs.
If an item in ExprList does not have a type appropriate
for its field in StrExpr, a "Type mismatch" error occurs.
The Basmark QuickBASIC Programmerís Manual