Zero Is SuccessUsually, on success, a program returns zero to the OS. For example:
int main () {
...
if (!valid_input) {
printf("Operation failed!");
return 1;
}
return 0;/* success */
}
Likewise, many operating systems and libraries have the convention of returning zero from successful system calls.
"One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs." -- Robert Firth
EditText of this page
(last edited August 24, 2007)
or FindPage with title or text search