Lloyd Fuller wrote

<begin extract>
And then you have C / C++ that uses RC=1 as the good return code.  Any other is
bad.
</end extract>

This practice reflects another C design defect.  In the absence of an
explicit boolean data type, C  uses the dubious but ineluctable
convention that a coded-arithmetic value of 1 represents truth and one
of zero represents falsity.  Values that are not 1, truth, are then by
extension treated as representations of falsity.

In and only in a UNIX | C/C++ ernvironment this convention  has merit.
 Given the fraught decision to dispense with an explicit boolean data
type, I cannot think of a convention that would be less objectionable;
it makes the best of a bad situation; and it is also an interesting,
all but unique instance of a retreat from the facilities that FORTRAN
IV makes available in C, which is a very much more FORTRAN-like
language than it is usually understood to be.

John Gilmore, Ashland, MA 01721 - USA

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to