I/O Option or Carriage Control

If the <I/O option or carriage control> element is [LINE <arithmetic expression>] and the file is a printer file, then the printer spaces forward to the specified line before printing. The PAGESIZE file attribute of the file must be nonzero. Because the default action for ALGOL is to print before carriage action, a subsequent WRITE statement can overprint the line.

The [CONTROL <arithmetic expression>] construct is meaningful only for KIND=LBP direct files. The construct [CONTROL 2] is a WRITE modifier used to perform a Flush LBPI Buffers operation. Higher CONTROL values are WRITE modifiers used to perform Mode Change operations that set the type of data to be returned by the next Read Information operation, as follows:

Value

Meaning

3

Fault Character information

4

Count of output pages to a stacker

5

LBP Sense Bytes information

The [SKIP <arithmetic expression>] construct causes the printer to skip to the channel indicated by the value of the arithmetic expression after printing the current record. The LINENUM file attribute of the file is reinitialized to 1 when [SKIP 1] is used, but the PAGE file attribute is not incremented.

The [SPACE <arithmetic expression>] construct causes the printer to space the number of lines specified by the arithmetic expression after printing the current record, or before printing the current record if the WRITEAFTER compiler control option is set. For nonbinary writes, the default of single-spacing is equivalent to [SPACE 1]. Overprinting can be achieved with [SPACE 0]. For binary writes, a carriage control is done before the SPACE carriage control option is evaluated. The default of single-spacing is equivalent to [SPACE 0], and overprinting is not possible. On other types of devices, this construct causes the number of records specified by the value of the arithmetic expression to be spaced.

For disk files the [SPACE <arithmetic expression>] construct works in the following manner. A WRITE statement that is not a binary write spaces before writing. The disk file might be extended as a result. A binary write spaces after writing unless the WRITEAFTER compiler control option is used to indicate that spacing should take place before writing. The file cannot be extended. The effect of this construct is not necessarily the same as a WRITE statement following or preceding a SPACE operation.

If the specified file is a remote file, the [STOP] construct causes the normal line feed and carriage return action to be omitted.

The [STACKER <arithmetic expression>] value is ignored by the operating system at run time.

The [SYNCHRONIZE] construct enforces synchronization between the logical and physical file. Synchronization means that output must be written to physical file before the program initiating the output can resume execution. The SYNCHRONIZE file attribute designates the synchronization for all output records, and the [SYNCHRONIZE] construct overrides the specified synchronization for the record being written. The [SYNCHRONIZE] construct is available for use by disk files with FILEORGANIZATION=NOTRESTRICTED or for tape files, and is not available for use with port files.

The [TIMELIMIT <arithmetic expression>] construct is meaningful only for remote files. The write operation is terminated with a TIMELIMIT error if the buffer is not available within the number of seconds specified by the value of the arithmetic expression.

The [STATION <arithmetic expression>] construct is meaningful only for remote files. It assigns the value of the arithmetic expression to the LASTSUBFILE file attribute of the file.

Imported events and event arrays cannot be used as <event designator> s in a direct I/O WRITE statement.

For more information on the FILEORGANIZATION, LASTSUBFILE, LINENUM, PAGESIZE, or SYNCHRONIZE attributes, refer to the File Attributes Programming Reference Manual.

On output to the printer, the [NO] construct causes the line feed after a write to be suppressed.