value of TRUE???

Karl Heuer karl at haddock.ima.isc.com
Wed Mar 8 08:14:44 AEST 1989


In article <16248 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>[The operators] !, <, <=, >, >=, ==, !=, &&, and || ... return either <int,1>
>(representing `true') or <int,0> (representing `false').  Thus, in [this]
>respect, the value of `true' is <int,1>.  No other value is produced for true
>conditional expressions.

This is true for the operators, as you say.  It should probably be mentioned
that it is not necessarily true for functions, even those standard library
functions that are conceptually boolean: for example, isdigit('6') returns 4
on this system.

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list