mirror of
https://github.com/ProgramSnail/Lama.git
synced 2026-01-01 11:38:20 +00:00
Function tests in interpretation
This commit is contained in:
parent
44b8a96e34
commit
784cc6510d
7 changed files with 65 additions and 1 deletions
12
regression/test033.expr
Normal file
12
regression/test033.expr
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
fun test (n, m) local i, s {
|
||||
s := 0;
|
||||
for i := 0, i <= n, i := i + 1 do
|
||||
s := s + i;
|
||||
if s > m then return s fi
|
||||
od;
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
write (test (10, 100));
|
||||
write (test (100, 10))
|
||||
Loading…
Add table
Add a link
Reference in a new issue