fd_eof_function
fd_eof_function — attaches an eof-activated callback to a file.
Syntax
fd_eof_function (fd|file, code)
Arguments
- fd|file
- A file descriptor as returned from fd_open, or
the name of a file pointer to a file that was opened by a call
to open or
open_string.
- code
- Any valid Gamma program, executable
code block, or statement.
Returns
The return value of the executed code.
Description
This function acts as a callback, causing the
code to execute whenever the end of the
file (_eof_) is reached during a call to
fd_read or
one of the other read functions.
The fd|file argument identifies the file.