C-style.
elect
elect
Sun Oct 24 23:26:06 AEST 1982
For my two cents worth, I think the formatting
if (<condition>) {
<statements>;
:
:
}
is the most aesthetically pleasing. It does not seem that there's
any difference between this and the format where the closing brace
is lined up with the `if' as far as telling which block goes with
which conditional, as long as one sticks to one format throughout
a program. For this reason, I think putting rules like this into
a `style manual' is unnecessary. What do people think about some
people's practice of writing structure/union expressions like
structure . member = struct_pointer - > member;
with all the spaces? All of this discussion about style is probably
not going to have a hell of a lot of impact -- programmers as a
lot are rather headstrong. People are going to stick to whatever
style they like. As long as the programmer is consistent and
documents his style conventions (to the extent that, say, identifiers
with all majuscule characters are `defined' constants and so on),
which means he's probably half-way serious about making his code
readable and maintainable, I don't see any problem with style. If
someone is simply messy, no style manual is going to change things.
As far as big projects, of course, some convention should be
established for the sake of communication and productivity among
the many programmers who may be involved.
Harry
ARPAnet: G.antares at Berkeley
LBLG!Harry#pdm at LBL-Unix
UUCP: ...!ucbvax!G:antares
More information about the Comp.lang.c
mailing list