NAME
-
write # - write to a sequential file
SYNOPSIS
-
write #FileNum[,
ExprList]
DESCRIPTION
-
Write #
is similar to
print #.
The difference is that
write #
inserts commas between the displayed items,
delimits strings with quotation marks, positive numbers are not
preceded by blanks.
If the ExprList is omitted, a blank line is output.
A newline is output following the last item in the list.
FileNum is the number under which the file was opened for output.
ExprList is a list of numeric and/or string expressions, separated by
commas or semicolons.
EXAMPLE
-
The program
rem create a file
open "logo" for output as 1
w$ = "Basmark"
50 write #1, w$
rem read length of "logo"
v = lof(1)
print v
close 1
would write "Basmark" to the file "logo" and print its length:
10
SEE ALSO
-
print #, write
DIAGNOSTICS
-
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