Added dictionary support to OP_ITER

ISTRING_RESERVED was added to iStrings
call & callCFunction now use memmove instead of memcpy
Additionally, added cosmoO_setUserP, cosmoO_getUserP, cosmoO_setUserI and cosmoO_getUserI to the C API.
This commit is contained in:
2020-12-17 19:44:04 -06:00
parent b2c1f73e01
commit 0beeee0fdf
7 changed files with 105 additions and 17 deletions

11
examples/fibtest.cosmo Normal file
View File

@@ -0,0 +1,11 @@
local function fib(num)
if num <= 1 then
return num
else
return fib(num-2) + fib(num-1)
end
end
for (var i = 1; i < 40; i++) do
print("The fib number of " .. i .. " is " .. fib(i))
end