Re: 3.0.3
- Posted by Juergen Luethje <j.lue at gmx.de> May 12, 2007
- 747 views
Pete Lomax wrote: > Derek Parnell wrote: > > > > Jeremy Peterson wrote: > > > > > > Juergen Luethje wrote: > > > > > > > > global constant > > > > FALSE = 0, > > > > TRUE = not FALSE > > > Why not just > > > > > > TRUE = 1 > > > > Because it removes implementation dependancies. > > It is generally accepted <snip> 'FALSE' is implemented as zero; some > > implementations of 'TRUE', use 1, some -1, and some every non-zero value. > > By defining 'TRUE' as 'not FALSE' it will work with any implementation. > > FWIW I prefer this, which I got from someone on this forum: > }}} <eucode> > constant TRUE=(1=1), -- for Eu, 1 (aka <>0) > FALSE=(1=0) -- for Eu, 0 > </eucode> {{{ > It is succinct and programming-language-independent. <snip> Cool. In my code, TRUE also was language-independent, but FALSE wasn't. The following combination of both ideas also is language-independent:
constant FALSE = (1=0), TRUE = not FALSE
Regards, Juergen