I suppose you're talking about a FOR-NEXT loop. From the manual:
Code:
FOR Count = Start TO End {STEP {-} Inc}{Body}NEXT {Count}
1) The value of Start is assigned to the index variable, Count. Count can be a variable of any type.
2) The Body is executed. The Body is optional and can be omitted (perhaps for a delay loop).
3) The value of Inc is added to (or subtracted from if "-" is specified) Count. If no STEP clause is defined, Count is incremented by one.
4) If Count has not passed End or overflowed the variable type, execution returns to Step 2.
So your code FOR C = 0 to 6 will execute the body of the loop 7 times and then stop. C will be incremented to 7 but the body of the loop will not execute since 7 is larger than 6. That's where it stops.
/Henrik.
Bookmarks