Instruccion WRITE#

Objetivo:

Escribir datos a un archivo secuencial.

Sintaxis:

 WRITE #filenum, list of expressions 

Comentarios:

filenum es el número bajo el cual el archivo fue abierto para la salida.

list of expressions es una lista de cuerda y/o expresiones numéricas separadas por comas o puntos y coma.

WRITE# Y PRINT# las declaraciones se diferencian en esto WRITE# inserta comas entre los artículos cuando ellos son escritos y delimita cuerdas con comillas, haciendo delimiters explícito en la lista innecesaria. Otra diferencia es esto WRITE# no pone un impreso delante de un número positivo. Después de que el último artículo en la lista es escrito, una secuencia de comida de vuelta/línea de carro es insertada.

Ejemplos:

Let A$ = "CAMERA" and B$ = "93604-1". La declaración siguiente:

 WRITE#1, A$, B$

escribe la imagen siguiente al disco:

 "CAMERA", "93604-1" 

Una declaración INPUT$ subsecuente, como el siguiente, introduciría "la CÁMARA" a A$ "y 93604-1" a B$:

INPUT#1, A$, B$
 

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$

1