by workingandtired · 12y ago · 0 comments
Whether or not it's sloppy is up for debate and just a matter of personal preference.
Not _line_, _statement_. Consider
if(flag)
foo(); bar();
and if(flag)
foo =
bar +
baz;
That first example always calls bar().Warning: I haven't tested this, and am beginning to doubt a bit. It must be correct, but why, then, don't I remember seeing this in underhanded C contests? Combining that with macros allows you to hide the semicolon.
I personally like being able to do it since it allows me to do away with the 2 extra lines auto indent puts in if i add brackets. That's a 50% reduction for a 4 line if. Maybe I should just buy a bigger monitor.