Next: , Previous: , Up: MATRIX   [Contents][Index]


16.4.8 The READ and WRITE Commands

The READ and WRITE commands perform matrix input and output with text files. They share the following syntax for specifying how data is divided among input lines:

/FIELD=first TO last [BY width]
[/FORMAT=format]

Both commands require the FIELD subcommand. It specifies the range of columns, from first to last, inclusive, that the data occupies on each line of the file. The leftmost column is column 1. The columns must be literal numbers, not expressions. To use entire lines, even if they might be very long, specify a column range such as 1 TO 100000.

The FORMAT subcommand is optional for numerical matrices. For string matrix input and output, specify an A format. In addition to FORMAT, the optional BY specification on FIELD determine the meaning of each text line:

If BY and FORMAT both specify or imply a field width, then they must indicate the same field width.


Next: The GET Command, Previous: The LOOP and BREAK Commands, Up: MATRIX   [Contents][Index]