Updated: 11/30/2021, 7:00:45 PM
Created: 11/30/2021, 7:00:45 PM
Last Updated By: Jake Tuttle
Read Time: 1 minute(s)
Tags: record handling sequential file handling
The statement allows for reading from a file opened for sequential access. It takes the general form:
READSEQ Variable FROM filevar THEN | ELSE statements
- Variable specifies the variable to contain next record from sequential file.
- filevar specifies the file descriptor of the file opened for sequential access.
- Statements Conditional jBASE BASIC statements
Each READSEQ reads a line of data from the sequentially opened file. After each READSEQ, the file pointer moves forward to the next line of data. Variable contains the line of data less the new line character from the sequential file.
An example of use would be as:
OPENSEQ ".", "report.txt" TO FILE_VAR ELSE ABORT 201, "report file" READSEQ VAR_LINE FROM FILE_VAR THEN CRT VAR_LINE
to open a "report file" and read the first line from it.
See also PN1073 for changes to delimiter functionality as of jBASE 5.8.2.
Go back to jBASE BASIC
Go back to Programmers' Reference Guide