next{a}

Read(2267) Label: skip loop, execute the next loop,

Description:

Skip the current loop and continue with the next loop.

Syntax:

next{a}

Note:

next is used to skip the remaining code block in the current loop and execute the next loop as long as the cycling does not finish.

Parameter:

a

The master cell of the loop code block. If the master cell a is omitted, then it is the current loop that is running.

Example:

 

A

B

C

D

 

1

=[]

 

 

 

[1,1,3,3].

2

for 5

 

 

 

In this example, the next A2 and the break A2 are to control loop of the A2 level. The computation of A1 is the sequence [1, 1, 3, 3].

 

3

 

for 2

 

 

4

 

 

if A2==2

next A2

5

 

 

if A2==4

break A2

6

 

 

>A1=A1|[A2]

 

7

=demo.query("select * from EMPLOYEE")

 

 

 

 

8

=create(ID,Dept)

 

 

 

9

for A7

 

 

 

Extract records whose DEPT values are not "Sales" from the EMPLOYEE table.

10

 

 

if A9. DEPT=="Sales"

 

11

 

 

Next

 

12

 

>A8.insert(0,A9.EID: ID,A9. DEPT:Dept)

 

 

A8 returns result as follows:

Note:

1.By comparison, the break is to jump out of the cycling directly, while next is to ignore the remaining code block in the current loop, and proceeds to the next loop as long as the cycling does not finish.

 

2.If a is omitted, then the current loop will be under control. To control the loop at higher level, a is required.