When you encounter
FOR variable = from-value TO to-valueyou expect that every time the loop is executed, the same variable is incremented and checked against the to-value, to see if the loop should stop. This is not the case.
DIM A[100] A[5]=80 J=1 FOR A[J]=1 TO 15 PRINT J J=J+1 NEXTYou might expect 15 lines, starting with "1" and ending with "15". Instead, you get four lines, "1" to "4". When the FOR statement is first encountered, J has the value 1, and the variable A[1] is initialized to 1. Inside the loop, J is incremented. When the NEXT is reached, the program goes back to the FOR. Now, A[2] is incremented, and checked against the to-value, 15. Next time, A[3] is incremented and checked. In fact, it is possible that a FOR statement can be looped back to many times, and eventually cause a "Subscript out of range error". The variable of a FOR loop is not always the variable of the FOR loop. EDIT: I regret my choice of wording in this post. By the phrase "You might expect", I did not mean to imply that that was my expectation, or that the expectation of any particular individual is relevant to the bug report. A more proper phrase that I should have used is "A close reading of the SmileBasic documentation might lead one to expect". I apologize for the sloppiness of my expression.