See Also: Sequential File I/O, Read, ReadLn
To indicate that the end of a line has been reached in a sequential data file.
Boolean
When a read command encounters an end of line (eol) character in a sequential input file, it sets SeqEOL to True. The ReadLn command, however, sets SeqEOL to False and allows subsequent Read commands to function.
String sElement
Direct_Input "Aircraft.txt"
Repeat
Repeat
Read sElement
Show sElement ", "
Until (SeqEOL)
Readln
Showln
Until (Seqeof)
In this example, input file Aircraft.txt is opened, and delimited data items are read into string variable sElement and shown to the screen. When an end of line marker is detected, the repeat ... until loop terminates and the ReadLn command discards the EOL and sets SeqEOL false. The ShowLn command outputs a carriage return/linefeed to the screen, and execution loops back to the next line of input data.
Never rely on the value of the SeqEOL indicator other than on the line immediately following the line of code that sets it. Many different commands and messages alter the value of SeqEOL and other global indicators.
ReadLn always reads to and including the end of line (EOL) character, and sets SeqEOL false.
Without ReadLn, Read commands cannot read past an EOL.
Different operating systems indicate EOL in different ways. DataFlex interprets EOL in whatever way it is indicated in the host operation system and sets SeqEOL so that the condition may be dealt with a single program whose commands are not operating system dependent.
Read_Block does not respect end-of-line markers.