Am Dienstag, 17. Oktober 2006 23:19 schrieb Kevin Tew: > if ( foo ) > bar(); > else > bat();
> if ( foo ) no spaces in the parens. No example in pdd07 is looking like this. There where some ident rules in that pdd some time ago regarding that. Above vs.: if (foo) { bar(); } else { bat(); } Anything that has the smallest smell of ever needing an extra statement after if or else shall use braces in the first place (IMHO). if (ending) return 1; /* ok for me */ if (foo) { do_something(); /* might need something else too */ } leo