fix: break and continue

This commit is contained in:
Matthieu Bessat 2022-05-15 23:00:16 +02:00
parent c3af6bd5ca
commit bcaf2cb3b7
4 changed files with 135 additions and 83 deletions

View file

@ -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)