mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-29 18:18:21 +00:00
Implemented control constructs
This commit is contained in:
commit
a60a491e73
23 changed files with 487 additions and 9 deletions
12
regression/test012.expr
Normal file
12
regression/test012.expr
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
read (n);
|
||||
while n >= 0 do
|
||||
if n > 1
|
||||
then
|
||||
write (0);
|
||||
if n == 3 then write (0) else write (1) fi
|
||||
else
|
||||
write (1);
|
||||
if n > 0 then write (0) else write (1) fi
|
||||
fi;
|
||||
n := n - 1
|
||||
od
|
||||
Loading…
Add table
Add a link
Reference in a new issue