READ/SCALARS Command

Syntax: | `READ\SCALARS file{\n} s1{\c1} { s2{\c2} ... }`
Qualifiers: | `\ERRFILL,`
Defaults: | `\-ERRFILL`

By default, the first record is read from an ASCII file, and, if no errors are encountered on the read, the `I`th number is placed into scalar `sI`. New scalar variables are created. By default, no scalars will be made if an invalid field is encountered on the read.

A scalar appended to the file name, `file\n`, specifies the starting record. The first `n-1` records will be skipped.

By default, the `I`th number field is placed into scalar `sI`. The field number can be specified by appending a scalar, `cI`, to the scalar name as a qualifier. In this case, the `cI`th field can be placed into the `sI`th scalar. For example, after the command: `READ\SCALARS DUM.DAT W\2 X\4 Y Z\1` `W` would contain field `2`, `X` would contain field `4`, `Y` would default to field `3`, and `Z` would contain field `1`.

If the `\ERRFILL` qualifier is used, an invalid field causes that field to be set to `ERRORFILL`. By default, `ERRORFILL=0`, but it's value can be controlled with the `ERRORFILL` characteristic.

Examples

Suppose you have file `DUM.DAT` as below:

      1  23.7   0.1000E-5
      2 -31.4   0.2000E-3
      3   9.09  0.3000E-1

`READ\SCALARS DUM.DAT A B` results in: `A = 1, B = 23.7`

`READ\SCALARS DUM.DAT A/3 B` results in: `A = .000001, B = 23.7`

`READ\SCALARS DUM.DAT\3 A B` results in: `A = 3, B = 9.09`

`READ\SCALARS DUM.DAT\2 A/3 B` results in: `A = .0002, B = -31.4`

READ command