F_EOF
Tests if end of file has been reached.
IMPORTANT:
Avoid using this function. This function is
intended to be obsolete.

Arguments | ||
---|---|---|
ID | DINT | File number returned by F_ROPEN or F_WOPEN |
OK | BOOL | End of file indicator. TRUE if end of file has been reached at the last read or write procedure call. With FM_READ, the last message read from a file may not be correct, if the last character is not a string terminator. |
Example
(* FBD program using file management blocks *)

(* ST Equivalence: *)
file_id := F_ROPEN('data.bin'); WHILE not(F_EOF(file_id)) VAL := FA_READ(file_id); END_WHILE; message_input:= 'last val = ' + msg(VAL); ok := F_CLOSE(file_id);
Provide Feedback