SeqEOL Global Variable

See Also: Sequential File I/O, Read, ReadLn

Purpose

To indicate that the end of a line has been reached in a sequential data file.

Type

Boolean

What It Does

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.

Notes