[Info-vax] decrementing & for loops in C
Bob Eager
rde42 at spamcop.net
Fri Jan 9 11:11:27 EST 2009
On Fri, 9 Jan 2009 15:49:08 UTC, JF Mezei
<jfmezei.spamnot at vaxination.ca> wrote:
> Bill Gunshannon wrote:
>
> > In which case this is not a for-loop condition at all and you should have
> > used something like while.
>
> The advantage of a for (x = 0, i, x++) type of loop is that you don't
> need to be bothered with incrementing x, it is done automatically.
>
> I wouldn't be susprised if the above resulted in moreefficient
> incrementing of x compared to having a while loop where you manually
> incremented it.
I would be surprised if it did make a difference! The optimiser will
notice what is happening in both cases...
--
Bob Eager
More information about the Info-vax
mailing list