casts to (void)

VLD/VMB gwyn at BRL.ARPA
Tue Aug 6 05:16:19 AEST 1985


"The printf function returns the number of characters transmitted,
or a negative value if an output error was encountered."
	- ANSI X3J11 draft standard
	- similar wording in 1984 /usr/group Standard
	- similar wording in System V Interface Definition

4.2BSD printf returns 0, or EOF if an output error was encountered.

If you are trying to write code that runs unmodified both in
standard environments and on 4.2BSD (not recommended), then
testing whether printf returns a negative value is sufficient.



More information about the Comp.lang.c mailing list