.read command (Runoff)

The .read command transfers control to the specified Runoff item for output and returns control upon completion.

Syntax

.read {file.reference} item-ID

Parameter(s)

file.reference Specifies file that contains the item to which control is transferred. If not specified, the item is read from the same file as the item being processed
item-ID Specifies item for output.

Description

The .read command causes Runoff to read the item-ID indicated. If no file reference is specified, the item is read from the same file as the item being processed. The text input from this item is processed and output without any parameter or mode changes. After processing this item, Runoff resumes input with the next line of the current source of input. This command does not cause a break.

The .read command scans the string following the command, looking for an item-ID or a file name. The legal delimiter for the item-ID or the file reference is a space or a period. If there is more than one delimited field following the .read command, the next-to-the-last field is taken to be the file name, and that file is opened. The last delimited field is considered the item-ID, and it is retrieved by the Runoff processor to be executed next.

If the statement is a .read, the processor eventually returns to the current item and continues processing at the beginning of the next line in the item. No statements occurring after the .read statement in the line are executed. A comment statement may be included after the .read command. The line is considered exhausted when the processor encounters an end-of-line mark, or when it encounters a period preceded by a space.