Script READ Statement

READ _varname

The READ statement reads a single line from the OPEN file and stores the value, without a carriage return character, in _varname. For example

:

ECHO "reading first line of INPUT FILE"
OPEN <input.txt>
READ _line
CLOSE

The file input.txt is opened and the first line is read into the variable _line.

If an end-of-file condition is reached or an error occurs, the _$filerror system variable will be non-zero.

Copyright © 2017 American Chemical Society. All Rights Reserved.