lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Mon, 3 Oct 2022 at 19:24, bil til <> wrote:
> > if I call where .abc does not exist,
> Sorry, but a basic question from a Lua beginner, not in "Lua tricks
> state" yet, sorry... . (and I do not really see how you can call this
> solution approach "simple" :) ).
> I assume, you do NOT have any access to f, e. g. f would be a module
> loaded from some external source?

Not the OP, but it may be the opposite problem ( he wants to pass the
table to someone which calls arbitrary methods, possibly with a
somehow more complicated logic for function generation ).

> (as if you would have the table f defined INSIDE this lua file, then
> it should be very straight forward just to add an additional function

If it were just the file, he could just call print("abc",...) ;->  I
would assume it is a proof of concept of a more complex thing ( given
the global variable usage, among other things ).

Francisco Olarte.