for a , b , s

Read(451) Label: specified, scope, step, loop,

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.

Parameters:

a

An integer

b

An integer

s

An integer to indicate the step. Its value is 1 by default.

Example:

 

A

B

 

1

 

 

Save the cumulative total -18 - in A1.

2

for 1,11,5

 

 

3

 

>A1=A1+A2

Add up integers within the scope from 1 to 11 with a step of 5, i.e. every 4 integers.