BOOL

libbtng Api Reference: BOOL

BOOL is the same type as SDL_bool, it's only a shortcut. It can be assigned the values TRUE and FALSE (which are in fact redefinitions of SDL_TRUE and SDL_FALSE).

Syntax

BOOL b=FALSE;

Remarks

Since this is an integer type, integer values can be assigned to BOOL variables, where 0 evaluates to FALSE and all other values evaluate to TRUE. Therefore a BOOL variable should never be explicitly checked for equality of TRUE unless you know what you are doing. Examples:

BOOL b=5;

never do this:

if(b==TRUE)

these are ok:

if(b==FALSE)
if(b)
if(!b)