I believe that there is no difference
in this case. It is a common convention
to write i++, not ++i, but that's
just that, a common convention.
On the principle that
for(exp1; exp2; exp3) {
stmt(s)
}
is equivalent to
exp1
while (exp2) {
stmt(s)
exp3
}
the results of a -for- loop will not vary
as long as different exp3 have the same results.
In your case this is true of i++ and ++i
but I guess someone could come up with exp3
for which this was no longer true.
Nick
[email protected]
[email protected]
> for (i=1;i<=2;i++)
>
> Is there a difference with :
> for (i=1;i<=2;++i)
>
> It is not clear with (about the
> preseance of incrementing : before or after)?
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/