#define FLAG_A (1 << 0)
#define FLAG_B (1 << 1)
#define FLAG_C (1 << 2)
int funcA(void)
{
return 0;
}
int funcB(void)
{
return 0;
}
int funcC(void)
{
return 0;
}
int execute(unsigned char flg)
{
if (flg & FLAG_A)
{
funcA();
}
if (flg & FLAG_B)
{
funcB();
}
if (flg & FLAG_C)
{
funcC();
}
return 0;
}
int main(void)
{
unsigned char flg = 0;
flg |= FLAG_A;
//flg |= FLAG_B;
flg |= FLAG_C;
execute(flg);
return 0;
}