Bit Arrays

You can create an array of bits (or booleans). You cannot create a pointer to an array of bits or to a bit.


/*
This will create an array of bits, and initialize their values
*/

int1 flags[]={TRUE, TRUE, TRUE, FALSE, FALSE, FALSE};

/*
Some usages:
*/

bool = flags[1];

if ( flags[2] ) { /* do something */ }

flags[i++] = FALSE;

C-Aware IDE Demo
Embedded C Learners Kit
EZ App Lynx