David Grove wrote:
> There is no ternary state for a boolean value. True/False, Yes/No, On/Off, 
> 1/0. Are you suggesting Yes/No/Maybe? Or are you redefining True and False?

He's suggesting True/False/-True (as in, 1/0/-1, which is what you get
from cmp and <=>).  How hard is that to understant?


> What you're asking has no counterpart in boolean logic, and 
> as such would make no sense in any computer language. 

Screw boolean.  It's just a three-way switch, exactly as if/else
is a two-way switch.  (As has been noted, switch() would handle this
and the more general case.)

-- 
John Porter

Reply via email to