# WRITE# Statement

#### Purpose:

To write data to a sequential file.

#### Syntax:

    WRITE #filenum, list of expressions

#### Comments:

filenum is the number under which the file was opened for output.

list of expressions is a list of string and/or numeric expressions separated by commas or semicolons.

The WRITE# and PRINT# statements differ in that WRITE# inserts commas between the items as they are written and delimits strings with quotation marks, making explicit delimiters in the list unnecessary. Another difference is that WRITE# does not put a blank in front of a positive number. After the last item in the list is written, a carriage return/line feed sequence is inserted.

#### Examples:

Let A$ = "CAMERA" and B$ = "93604-1". The following statement:

    WRITE#1, A$, B$

writes the following image to disk:

    "CAMERA", "93604-1"

A subsequent INPUT$ statement, such as the following, would input "CAMERA" to A$ and "93604-1" to B$:

    INPUT#1, A$, B$