Oxygen Basic

Programming => Problems & Solutions => Topic started by: Peter on March 09, 2016, 06:22:52 AM

Title: True
Post by: Peter on March 09, 2016, 06:22:52 AM
Hello,

why uses o2b -1 for True ?
Title: Re: True
Post by: Charles Pegge on March 09, 2016, 10:53:12 AM

Any non-zero value, can represent true, but -1 is safest to use with bit-wise logic.
Title: Re: True
Post by: Peter on March 09, 2016, 11:22:27 AM
Quote
Any non-zero value, can represent true, but -1 is safest to use with bit-wise logic.

Thanks Charles,

yes that true, other idiots take 1  ;D
Title: Re: True
Post by: JRS on March 09, 2016, 02:02:09 PM
Best way around that is test for non-FALSE.