a style question
Hascall John Paul
john at IASTATE.EDU
Mon Oct 1 10:44:48 AEST 1990
In article <8660 at ncar.ucar.edu>, steve at groucho.ucar.edu (Steve Emmerson)
writes:
>
> >Since I going to be doing my first team effort I want to know if this is bad
> >style:
> > for(x=0;x!=100;x++) ...
>
> It's OK, though some improvements could be made. ...
>
> for (x = 0; x < NUM_ELEMENTS; x++) ...
This is really pointless, but I don't see that stopping anyone else...
What is the generally preferred usage? Or does it matter at all?
++x; or x++;
I find myself using ++x (which in my mind I attribute to some long gone,
brain-damaged optimizer from my past -- but I still persist). My `favorite'
is:
--x; and x++; (pre-decrement, post-increment!!!)
> Note also the use of additional whitespace.
Please!
--
John Hascall An ill-chosen word is the fool's messenger.
Project Vincent
Iowa State University Computation Center john at iastate.edu
Ames, IA 50010 (515) 294-9551
More information about the Comp.lang.c
mailing list