[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Redefining functions
- From: Ben Sunshine-Hill <bsunshin@...>
- Date: Sat, 28 Sep 2002 20:47:15 -0700
> hmm,.. interesting, but probably not doable since I have no knowledge
> of what the user wants to do in the script. ( it doesn't have to be a
> function ).
When you load a lua script into the interpreter, it is _always_ loaded as a
function. Basically, any block of Lua code is a function, including the top
level one. So, for instance, this script:
-- do something
a = 3
...consists of two functions: the function "foo", and the top level function.
So yes, this will always work.