On Wed, Aug 15, 2001 at 11:28:20AM +0100, Dave Mitchell wrote:
> The one thing I'm not sure about is whether we should mandate where the
> comments go. For example, I personally Iike comments before the
> conditional describing the condition, and/or comments after describing
> the action:
>
> /* stack full ? */
> if (ix > max_ix) {
> /* allocate more */
> ....
> }
> else {
> /* push the thinggy */
> ....
> }
>
> So, do we mandate or not, and if yes, what style?
This style of placing comments seems to be logical and consistent.
Maybe it would be better to "advise" rather than "mandate" the style?
Can we generalise it to "comments should appear on the line(s)immediately
above the code that they are describing"?
Nicholas Clark