Peter Bindels wrote: > #ifdef FOO_INIT > #define VAR_DECLARE(var, init) extern var > #else > #define VAR_DECLARE(var, init) var = init > #endif > > [header] > VAR_DECLARE(int a, 42); > VAR_DECLARE(static int b, 12); > VAR_DECLARE(volatile int c, 44); > const int d = 45; > [/header] One disadvantage of getting so fancy (that is, so far away from standard C syntax) is that IDEs that help the programmer out with parsing the code and supplying all kinds of help with the syntax (like showing the declaration of a variable in a flyover) often don't understand such declarations. They have less problems with the form Dave and Peter suggested. Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist