User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

ferror [2017/07/06 03:16] (current)
Line 1: Line 1:
 +$[[ferror]](<<​file descriptor>>​)
 +This function returns non-zero if an error has occurred on the 
 +//file descriptor//​ since the last [[read]], because the [[read]]
 +and [[readb]] functions clear the //file descriptor//​s error code.
 +When the [[read]] or [[readb]] function return the empty string, that
 +is caused either by an error, an eof, or a blank line.  This function
 +will tell you if it was an error. ​ The [[eof]] function will tell you
 +if it was an end of file.
 +The //file descriptor//​ must have been a value previously returned by 
 +the [[open]] function. ​
 +|-1   ​|Error:​ //file descriptor//​ was not previously returned by [[open]]|
 +| 0   |no error has occurred since the last [[read]]|
 +| 1   |an error has occurred since the last [[read]]|
ferror.txt ยท Last modified: 2017/07/06 03:16 (external edit)