"Oh no! Not more on braces"
utzoo!decvax!harpo!eagle!mhuxt!mhuxa!mhb5c!gsp
utzoo!decvax!harpo!eagle!mhuxt!mhuxa!mhb5c!gsp
Wed Nov 17 17:33:03 AEST 1982
Sorry, but here's my two cents worth.
I use:
for (.....)
{
...
}
for a few reasons. I used to use:
for (.....) {
...
} & eve }
but I found that changing one line changed the meaning of other statements.
This is like the Pascal controversy about whether the semi-colon should
be a statement terminator or separator. As a separator, changing one
line can affect the meaning of others, especially with if-then statements.
So I like to block blocks of statatements so they can be moved around
independent of others. Putting the { on the same line as the super-
statement makes commands in vi line >% impossible (fyi, that means move
this brace and all up to the one matching it over).
As far as readability goes. I think all the forms are roughly equivalent.
I have little trouble understanding anyones style if it is uniform.
This is interesting. I guess most here know about cb, that crummy
C pretty-printer. Well try this:
cp `whereis cb` .
bc cb.c > cb2.c
diff cb.c cb2.c
I don't know about your versions, but our's are different. Hmmm.
gary perlman hm 5d-105 x-3624 mhb5b!gsp
More information about the Comp.lang.c
mailing list