print # using - formatted write to sequential file


print #FileNum, using StrExpr; ExprList[;]


Print # using writes the values of the expressions in ExprList to the file specified by FileNum according to the formatting information contained in StrExpr.  FileNum may be any numeric expression.  StrExpr is a string expression which consists of special formatting characters.  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. 


The program
	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
	close #1
	print "Data written to file..."
and the input
will create "datafile1", storing the userís input amounts sequentially as follows:
	$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. 

from The Basmark QuickBASIC Programmerís Manual by Lawrence Leinweber