As Ski pointed out, i is a variable. It's called a variable because, unlike fixed constants it changes. If i is a byte sized variable it can take on any form between (0-255) Whilst if it's a word sized it can be assigned with anything up to 65,536.
When we see something like this:
It's basically just adding 1 to the existing contents of i. This is referred to as incrementing. So, if i = 100 and we encounter i = i + 1, the new value of i will be 101.
For Next Loops:
Code:
FOR i = 1 TO 10
j = j + 20
NEXT
Strangely enough, more than often we encounter i as a variable within these loops. It could be anything actually. J, K - doesn't matter. FOR NEXT loops will execute the contents between FOR and NEXT a predefined number of times which is set by the numbers after TO minus the numbers after FOR. In the example above, j will have 20 added to it 10 times. The final result of j will be 200 when the loop has finished. However, this assumes that the initial starting value of j was 0.
<br/>
Bookmarks