break {a}

Read(218) Label: break loop,

Description:

Break the current loop.

Syntax:

break {a}

Note:

The function reaks a loop whose master cell is a. If a has value, then break the current loop.

Parameters:

a

The master cell of a loop block. If a is omitted, then the function indicates the current loop.

Example:

 

A

B

C

D

 

1

=[]

 

 

 

[1, 1, 2, 2, 3, 3]

2

for 5

 

 

 

The computation of A1 is a sequence [1, 1, 2, 2, 3, 3]; break A2 is to control the loop of the A2 level

 

3

 

for 2

 

 

4

 

 

if A2==4

break A2

5

 

 

>A1=A1|[A2]

 

 

6

=create(ID,Dept)

7

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

 

8

for A7

 

 

 

 

9

 

if A8.NAME=="Alexis"

Extract the data of DEPT from the EMPLOYEE table and insert them to a table sequence uninterruptedly until the record whose NAME value is "Alexis" appears

10

 

 

break

11

 

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

 The return value of A6 is shown in the figure