34 lines
789 B
Markdown
34 lines
789 B
Markdown
\page standard-bool ARC_Bool
|
|
|
|
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)
|
|
|
|
Basic Example:
|
|
```c
|
|
#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:
|
|
```c
|
|
#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
|
|
}
|
|
```
|