Re: ESL Master Include File
- Posted by Derek Parnell <ddparnell at bigpond.com> Jul 26, 2005
- 568 views
Pete Lomax wrote: [snip] > Despite the highly unlikely chance > of such things, some libraries actually do define TRUE=(1=1) and > FALSE=(1=0). That would be me > There is nothing wrong with using tri-logic with say isTLtrue=1, > isTLunknown=0, and isTLfalse=-1, (though isTLfalse=0, and > isTLunknown=-1 would probably be just as effective) but > defining FALSE as -1 is just brain-dead stupidity. Why? The only requirement is that TRUE and FALSE have different values from each other. One could have ... constant TRUE = 't', FALSE = 'f' And all code that relied on using TRUE and FALSE would still work. One's code should never be doing arithetic on boolean values and never doing relative comparisions either (less than, greater than). Instead one's code should only be doing assignments and equality tests. BTW, and I'm sure you already know this, but there are plenty of languages that implement TRUE as -1 instead of 1. -- Derek Parnell Melbourne, Australia Skype name: derek.j.parnell