|
Use this function to check if the end of a file that is open for read access has been reached. This function returns the logic value TRUE, if the file does not contain any additional lines. Otherwise the logic value "FALSE" is returned. |
|||||||
![]() |
The 'eof' function may be used together with recursive decision table calls or while loops to read a file containing an arbitrary number of lines. The function determines if another (recursive) call or loop must be executed or if the end of file marker has been reached and the file processing can be terminated. | |||||||
Syntax: |
||||||||
{LOG_VAR}= eof({INT_VAR}) | ||||||||
I/O parameters:
|
||||||||
Return value: |
||||||||
|
||||||||
Example: |
||||||||
Declaration of Variables | ||||||||
10 C -- Pre-definiton of variables 20 DOCU_LOGIC_1 = FALSE 30 DOCU_STRING_1 = "/tmp/test.seite" .. 90 C -- Open file for read access 100 DOCU_INT_1 = open(DOCU_STRING_1,"r") 110 DOCU_LOGIC_1 = eof (DOCU_INT_1) 120 C -- output of line contents until end of file is reached |
||||||||
|
||||||||
![]() |
Functions and commands: File Interface |