archeus/doc/pages/standard/bool.md

879 B

\page standard-bool ARC_Bool

Basic Overview

The ::ARC_Bool type simple sets ::ARC_Bool to the stdbool.h bool type, ::ARC_True to true, and ::ARC_False to false. This type exists so that it can be overriden if a different boolean type should be used (like with opengl)

The API Reference for ::ARC_Bool can be found here: arc/std/bool.h

Basic Example

#include <arc/std/bool.h>

ARC_Bool example = ARC_True;

//this example is very pedantic, saying `== ARC_True` isn't required, just recommended
if(example == ARC_True){
    //this will be executed
}

Override Example

#include <stdint.h>

//this should be called at the start of the program
#define ARC_BOOL_OVERRIDE
#define ARC_Bool  uint8_t
#define ARC_True  1
#define ARC_False 0

#include <arc/std/bool.h>

ARC_Bool example = ARC_False;

if(example != ARC_True){
    //this will be executed
}