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
- if then else otherwise ... raptor
- Re: if then else otherwise ... Michael G Schwern
- RE: if then else otherwise ... Sterin, Ilya
- Re: if then else otherwise ... raptor
- Re: if then else otherwise ... David Grove
- RE: if then else otherwise ... Sterin, Ilya
- Re: if then else otherwise ... raptor
- Re: if then else otherwise ... David Grove
- Re: if then else otherwise ... John Porter
- Re: if then else otherwise ... Bart Lateur
- Re: if then else otherwise ... John Porter
- Re: if then else otherwise ... raptor
- Re: if then else otherwise ... raptor
- Re: if then else otherwise ... Bart Lateur
- FW: if then else otherwise ... Brent Dax
- Re: if then else otherwise ... Bryan C . Warnock
- Re: if then else otherwise ... raptor
- RE: if then else otherwise ... Sterin, Ilya