Well, its useful in the case when you want an iterator in an endless loop. Its the same as:
Code:
int i;

i = 0;
while(1)
{
   // foo
   i++;
}


(imo for(i=0; ; i++) is less ugly)

The C Standard allows you to have any or none of the components set in a for loop, so this would be also possible: for(;;) {} or just for(;;i++) { }.
And Dark_Samurai: Declaring variables in an for loop is C99 and imo Lite-C only aimes compatibility to a subset of C89.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com