qb45advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WRITE# Statement Details
  QuickSCREEN      Details      Example      Contents      Index
──────────────────────────────────────────────────────────────────────────────
WRITE# Statement Details
 
Syntax
  WRITE #filenumber[,expressionlist]
 
The filenumber is the number used in the OPEN statement. The file must
be opened in OUTPUT or APPEND mode. The expressions in the argument
expressionlist are string and/or numeric expressions, separated by
commas. If you omit the expressionlist, the WRITE # statement writes a
blank line to the file.
 
The WRITE # statement, unlike the PRINT # statement, inserts commas
between items as they are written to the file. You do not have to put
explicit delimiters in the list. A new line is inserted once the last
item in the list has been written to the file.
 
If WRITE # attempts to write data to a sequential file restricted
by a LOCK statement, an error message appears that reads "Permission
denied" unless the error is trapped by the program. All of BASIC's
usual error-handling routines can trap and examine this error.