langatator/examples/while_demo.ltor

15 lines
259 B
Text
Raw Normal View History

2022-05-15 21:00:16 +00:00
# show case of 'continue' and 'break' keyword in their natural environment
set i to 0
while 1 do
if i > 10 then
break
end
2022-05-15 21:00:16 +00:00
if i = 5 then
set i to i+1
continue
end
print_number(i)
set i to i+1
end
2022-05-15 21:00:16 +00:00
print_number(i)