lua-users home
lua-l archive

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


2009/11/5 Francesco Abbate <francesco.bbt@gmail.com>:
> 2009/11/5 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
>> If you can use m(i,j) (as in Fortran), then you can set a __call metamethod.
>
> That's an excellent suggestion!! Thank you very much, it will spare me
> a lot of hard work with Lua internals :-)

I better thought about this problem and the __call metamethod does not
make the affair since, for assignments, the syntax:

m(i,j) = value

will be invalid.

So I still need to hack the __index and __newindex metamethods.

Please give me some hints about the Lua code so that I can modify it.
I need a real solution and a modification of Lua is really needed!

Francesco