> 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 Some C compilers still warn with the syntax above. I prefer: if ( 0 != (errcode=get_error()) ) ... I have never seen a compiler that gives a warning in this case. I also prefer the explicit comparison against 0, I generally don't like non-boolean values inside an if (...). As an aside, and on the other hand, I really can't stand something like: bool bFlag; .... if ( bFlag == true ) .... Let a boolean be a boolean! --- Bob Ammerman RAm Systems -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist