print # - write data to a sequential file


print #FileNum[, ExprList]


Print # writes the values of the expressions in ExprList to the file specified by FileNum.  ExprList is a list of numeric and/or string expressions, separated by commas or semicolons.  Any string constants in the list must be enclosed in quotation marks.  If the ExprList is omitted, a blank line is written. 

String expressions should be separated by semicolons in the list.  Explicit delimiters must be used in the print # statement to avoid "bleeding" of several strings into one.  See print for details. 


The program
	   rem create a file
	   open "logo" for output as 1
	   w$ = "Basmark"
	50 print #1, w$
	   rem read length of "logo"
	   v = lof(1)
	   print v
	   close 1
would write the string "Basmark" to the file "logo" and print its length:


print, write #


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. 

from The Basmark QuickBASIC Programmerís Manual by Lawrence Leinweber