This command reads a single record from an external file that is currently opened (with the FOR INPUT option) into a variable.
The record read will be delimited by a newline character in the file. This newline character is used purely as a record delimiter and does not form part of the record.
By default, the file will be rewound when the end of file is reached. This action may be modified by use of the "AT END GOTO label" clause.
The file is read sequentially.
READ stringVariable FROM fileId;
READ stringVariable FROM fileId AT END GOTO labelName;
A string variable in which the next record from the file is read.
A FILE variable that was used in a previous OPEN command.
A label within the current scope of the Script, to which Script execution will branch if the end of file is reached.
OPEN "UserNames" AS DataFile;
While ( 1 )
READ szUser FROM DataFile AT END GOTO exitLabel;
Copyright © AgileLoad. All rights reserved.