[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: functions is lua
- From: Marius Booysen <tuppe99@...>
- Date: Mon, 29 Jul 2013 13:43:07 +0100
Just starting with lua and I wanted to test multiple return values from a function. I then ran into forward declaring issues (which I still am not clear on how it works), so I ended up with this code:
#!/usr/bin/lua
local func = function() end
b, c = func()
print(b, c)
local function func()
return 10, 11
end
When I execute is, it prints nil nil for the b and c.
Do all functions need to be complete before I can call it in Lua?
Thanks!