isPortAtEOF
isPortAtEOF(p_port) =>t/nil
Description
Takes an input port and returns t if end-of-file (EOF) has previously been detected while reading the input port; it returns nil otherwise.
Arguments
|
Input port. This must be open, otherwise the function will return an error. |
Value Returned
|
End-of-file (EOF) has previously been detected while reading the input port p_port. |
|
Examples
port = infile("input_file")
while(! isPortAtEOF(port)
printf("%L\n" read(port))
)
close(port)
Return to top