Avoid in-band error indicators while designing interfaces. This practice is commonly used by C library functions but is not recommended. One example from the C Standard of a troublesome in-band error indicator is EOF
. (See see FIO34-C. Distinguish between characters read from a file and EOF or WEOF). Another problematic use of in-band error indicators from the C Standard involving the size_t
and time_t
types is described by
...
[Burch 2006] | |
[ISO/IEC 9899:2011] | Section Subclause 6.3.2, "Other Operands" |
...