John Temples wrote: > On Tue, 11 Mar 2008, sergio masci wrote: > > if (condition) > CHECK_ERR; > else > something(); > > will give you a syntax error, because you have a semicolon between the > macro's closing brace and the "else". > That's why I _always_ use brackets with conditionals and loops, so if (condition) { CHECK_ERR; } else { something(); } should be just fine... BTW: The warnings for '=' instead of '==' could be eliminated if you double-brace the condition - as this is a legal in C and many people using it, especially in loops like while (c=getch())... so #define CHECK_ERR if( (errcode = get_error()) ) {print_error(errcode)} compiles without warning. Tamas -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist