On Mon, 10 Mar 2008, John Temples wrote: > On Tue, 11 Mar 2008, sergio masci wrote: > > > I must be dense. Why not just use a compound statement > > > > e.g. > > #define CHECK_ERR { \ > > errcode = get_error(); \ > > if (errcode) { \ > > print_error(errcode) \ > > } \ > > } > > 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". Ah, that explains it! I NEVER use 'if' statements without braces. I always write (for the last 20 or so years): if (cond) { } else { } I have seen errors like: if (cont) statement1; statement2; No 'else' after 'statement2' so the compiler has no chance of flagging an error :-( Regards Sergio -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist