![]() | for |
| Prev | Commands | Next |
Command for has following syntax:
for variable = start value to end value step expression do code end
Loop is executed starting from start value and it is ended when variable's value is bigger then end value. If step part is specified, on each step variable's value is increased by given value instead of 1.
foreach i = 1 to 20 step 5 do a = a + 2 * i end
| Prev | Home | Next |
| while | Up | foreach |