On 28/08/17 03:12, Paulo Costa wrote: > On 27-Aug-17 23:47, Dmitry Boyarintsev wrote: >> Is 2 neither true, nor false? 3? 4? >> >> If false is zero, >> Then true is not false. >> >> Also C doesn't have a boolean type per se. Iirc it was introduced in some >> version of c++ standard. >> >> In C it's very strange to see code like that: >> >> If (b==1) >> >> It's always >> If (b) >> Or >> If (!b) > > Of course, that is because, in C, any value that is not zero, is true. > > So you can not compare with 1 or -1 or any other value to test if it is > true... > > Paulo Costa
Even more 'proliferated' may be usage like - function returns = 0 on success - function returns > 0 for a success-with-a-hint or soft-failure (allowing for retry) - returns negative error code on hard-failure (not-allowing for retry) -L. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal