Originally Posted by Dave Scheck
...Chris posted while I was typing this....
Short answer is that #define and #if switches are processed before the compiler ever sees the code. Therefore you can't do what you are trying to do. You'd be better off storing the program number into a variable and deciding what to do based on that
PROG_DO_NOTHING = 0,
static int g_prog_num = PROG_DO_NOTHING;
g_prog_num = PROG1;
g_prog_num = PROG2;
Thank you very much for all the replies.
Dave, I am unfamiliar with the 'enum' command, what does it do? Assign values to the identities inside, ascending from the value assigned to the first identity?
Again, thank you very much,