lua-l archive
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
] [
Date Index
] [
Thread Index
]
Subject
:
Re: functions is lua
From
: steve donovan <steve.j.donovan@
...
>
Date
: Mon, 29 Jul 2013 15:05:38 +0200
On Mon, Jul 29, 2013 at 2:43 PM, Marius Booysen
<
tuppe99@gmail.com
>
wrote:
Do all functions need to be complete before I can call it in Lua?
They must be defined before they are used, yes. But you can do forward declarations if your functions call other functions:
local f,g
function g () return f() end
function f () return 10, 12 end
a,b = g()
print(a,b)
'local function f() .. end' is short for 'local f; f = function()...end' remember!
steve d.
References
:
functions is lua
,
Marius Booysen
Prev by Date:
Re: 20 years of Lua
Next by Date:
Re: 20 years of Lua
Previous by thread:
functions is lua
Next by thread:
Re: functions is lua
Index(es):
Date
Thread