Description:
Execute a loop according to the specified scope and step.
Syntax:
for a,b,s
Note:
The statement executes the code block in loops from a to b with a step of s.
Parameter:
a |
An integer |
b |
An integer |
s |
An integer to indicate the step. Its value is 1 by default |
Example:
|
A |
B |
|
1 |
|
|
|
2 |
for 1,11,5 |
|
|
3 |
|
>A1=A1+A2 |
Add up integers from 1 to 11 with a step of 5, i.e. every 4 integers, and store the accumulated value in A1.
|