style wars

Wonderly gregg at ihlpb.ATT.COM
Tue Dec 20 03:03:58 AEST 1988


>From article <14128 at oberon.USC.EDU>, by blarson at skat.usc.edu (Bob Larson):
] Since this flamefest has come up again, I thought I would contribute
] something I consider more readable than the "standard" representation.
] Null statements are sometimes useful in C, mainly as loop bodies.
] 
] Some people use semicolon on a line by itself for the null statment.
] I prefer a pair of braces:
] 
] 		for(p = FIRST; p->next != NULL; p = p->next)
] 		    ;
] 
] looks strange to me, and takes two vertical lines.
] 
] 		for(p = FIRST; p->next != NULL; p = p->next) {}

I prefer

 		for(p = FIRST; p->next != NULL; p = p->next)
 		    continue;

which is completely obvious and not so strange...

-- 
It isn't the DREAM that NASA's missing...  DOMAIN: gregg at ihlpb.att.com
It's a direction!                          UUCP:   att!ihlpb!gregg



More information about the Comp.lang.c mailing list