fix: break and continue
This commit is contained in:
parent
c3af6bd5ca
commit
bcaf2cb3b7
4 changed files with 135 additions and 83 deletions
|
|
@ -1,7 +1,14 @@
|
|||
# show case of 'continue' and 'break' keyword in their natural environment
|
||||
set i to 0
|
||||
while 1 do
|
||||
if i > 10 then
|
||||
break
|
||||
end
|
||||
if i = 5 then
|
||||
set i to i+1
|
||||
continue
|
||||
end
|
||||
print_number(i)
|
||||
set i to i+1
|
||||
end
|
||||
print_number(i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue