|
|
Topic complex |
Text functions |
Function |
eot() |
Short |
Signals the end of a text file |
Syntax |
EOT(text_handle : INTEGER) : INTEGER |
Parameter |
text_handle from RESET |
Return |
0 : end of text has not been reached yet
1 : end of text has been reached |
See also: |
|
Description |
Use Eot() when you are reading a text file in a loop. As soon as the text files and has been reached Eot() will return true so you can leave the loop.
As soon as Eot() returns 1, it must not be read from the text file anymore.
|
Example 1:
Give out a complete textfile line by line
VAR t : INTEGER
IF t:=reset('mytext.txt') THEN
WHILE NOT EOT(t) DO
cgiwriteln(readln(t))
END
close(t)
END
|
Write a comment:
|
|
|