Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,4 @@
|
|||
loop xx = 1 to 10
|
||||
if xx = 1 then leave -- loop terminated by leave
|
||||
say 'unreachable'
|
||||
end
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
loop xx = 1 to 10 -- xx is the control variable
|
||||
...
|
||||
loop yy = 1 to 10 -- yy is the control variable
|
||||
...
|
||||
if yy = 3 then leave xx -- xx loop terminated by leave
|
||||
if yy = 4 then leave yy -- yy loop terminated by leave
|
||||
...
|
||||
end
|
||||
...
|
||||
end xx
|
||||
|
||||
loop label xlabel xx = 1 to 10 -- xx is still the control variable but LABEL takes precidence
|
||||
...
|
||||
loop yy = 1 to 10 -- yy is the control variable
|
||||
...
|
||||
if yy = 3 then leave xlabel -- xx loop terminated by leave
|
||||
...
|
||||
end yy
|
||||
...
|
||||
end xlabel
|
||||
|
||||
do label FINIS
|
||||
say 'in do block'
|
||||
if (1 == 1) then leave FINIS
|
||||
say 'unreachable'
|
||||
signal Exception("Will never happen")
|
||||
catch ex = Exception
|
||||
ex.printStackTrace()
|
||||
finally
|
||||
say 'out of do block'
|
||||
end FINIS
|
||||
|
||||
loop vv over ['A', 'B']
|
||||
select label selecting case vv
|
||||
when 'A' then do; say 'A selected'; say '...'; end
|
||||
when 'B' then do;
|
||||
say 'B selected';
|
||||
if (1 == 1) then leave selecting;
|
||||
say '...';
|
||||
end
|
||||
otherwise do; say 'nl selection'; say '...'; end
|
||||
end selecting
|
||||
end vv
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
loop fff = 0 to 9
|
||||
...
|
||||
loop xx = 1 to 3
|
||||
...
|
||||
if fff > 2 then iterate fff
|
||||
...
|
||||
end
|
||||
...
|
||||
end fff
|
||||
Loading…
Add table
Add a link
Reference in a new issue