Author Topic: True  (Read 1870 times)

0 Members and 1 Guest are viewing this topic.

Peter

  • Guest
True
« on: March 09, 2016, 06:22:52 AM »
Hello,

why uses o2b -1 for True ?

Charles Pegge

  • Guest
Re: True
« Reply #1 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.

Peter

  • Guest
Re: True
« Reply #2 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
« Last Edit: March 14, 2016, 01:44:02 AM by Peter »

JRS

  • Guest
Re: True
« Reply #3 on: March 09, 2016, 02:02:09 PM »
Best way around that is test for non-FALSE.