>>15618715Uniquely enough, for can act wihout specifying some (or all) statements
^examplefor (;;)
{
code;
}
^endIn this case, for doesn't have a single statement, making an infinite loop (BUT! You still have to put two ; even if there are statements missing, no matter what)
^example 2int i = 0
for (; i < 5; i++)
{
Code1;
}
for (; i < 10; i++)
{
code2;
}
^endIn this case, we have int i as a separate value instead of being bound to the loops. Still, since both loops have statements 2 and 3 where they use i, int i will be used in both of them. First loop will act until i = 5, increasing i by one every time from 0 to 5. The second loop will start after the first loop, acting untill int i = 10, increasing i by one from 5 to 10 and stopping when i = 10