|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#9
|
|||||
|
|||||
|
Re: boolean
In reply to previous concerns:
As long as you use the logical operators (&& || !) instead of the bitwise ones (& | ~ ^), you shold be ok. If you need to use == and !=, I would recomend using one of this macros around the operands (the values being compared). Code:
// CBOOL Converts to BOOLean #define CBOOL(val) ((val) ? TRUE : FALSE) // LOGically EQuivalent #define LOG_EQ(val1,val2) (CBOOL(val1) == CBOOL(val2)) // LOGically Not EQuivalent #define LOG_NEQ(val1,val2) (CBOOL(val1) != CBOOL(val2)) |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Boolean statement | blindguyinanorg | Programming | 2 | 15-02-2004 07:31 |