mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-27 00:58:47 +00:00
Functions as values (no closures yet, and no tests)
This commit is contained in:
parent
f5b802ebed
commit
d69cb3d49d
12 changed files with 194 additions and 160 deletions
|
|
@ -1,10 +1,8 @@
|
|||
global n, k, res;
|
||||
global n = 2, k = 10;
|
||||
|
||||
n := 2;
|
||||
k := 10;
|
||||
res := 1;
|
||||
{local res = 1;
|
||||
while k > 0 do
|
||||
res := res * n;
|
||||
k := k - 1
|
||||
od;
|
||||
write(res)
|
||||
write(res)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue