For Until?

BlitzMax Forums/BlitzMax Beginners Area/For Until?

Yue(Posted 2015) [#1]
For Local i = 1 Until 10
 Print i

Next

For Local n = 1 To 10
 Print n

Next





Why Until no more shows to No. 9?


Floyd(Posted 2015) [#2]
Until 10 goes up to 9.
To 10 goes to 10.


Kryzon(Posted 2015) [#3]
In the IDE, this is described under Home -> Language Reference -> Program Flow.


therevills(Posted 2015) [#4]
If you have done Java or C(++), think of Until and To as operator symbols:

Until:
for (int i = 1; i < 10; i++)

To:
for (int i = 1; i <= 10; i++)