forked from s390guy/vm370
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLEAVE.HELPREXX
30 lines (24 loc) · 835 Bytes
/
LEAVE.HELPREXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
LEAVE instruction
+-----------------------------------------------------------------------------+
| LEAVE [name]; |
+-----------------------------------------------------------------------------+
The LEAVE instruction terminates the execution of a repeating DO instruction,
without regard to its condition controls.
The name, if specified must match the variable named on one of the executing DO
instructions. The named instruction, and any others active within it, are
terminated.
Examples:
/* displays 1, 2, 3 */
do i=l to 5
say i
if i=3 then leave
end
/* displays 1, 2, 3, 2, 4, 6, 3, 6, 9 */
do i=1 to 3
do j=1 to 2
do k=1 to 5
say i*j*k
if k=3 then leave j
end
end
end