Loading...
Searching...
No Matches
Boolean

Boolean type and constants. More...

Macros

#define false   0
 
#define FALSE   0
 
#define true   1
 
#define TRUE   0xFF
 

Typedefs

typedef unsigned char bool
 

Detailed Description

Boolean type and constants.

Warning
TRUE is 0xFF, not 1! This matches SNES convention where bit patterns are often used. Always compare with != FALSE rather than == TRUE.
if (flag) { } // Good
if (flag != FALSE) {} // Good
if (flag == TRUE) {} // Bad! Will fail for non-0xFF truthy values
static u16 bx
Definition main.c:159
#define TRUE
Definition types.h:126
#define FALSE
Definition types.h:125

Macro Definition Documentation

◆ false

#define false   0

◆ FALSE

#define FALSE   0

◆ true

#define true   1

◆ TRUE

#define TRUE   0xFF

Typedef Documentation

◆ bool