lua-users home
lua-l archive

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


I have written matrix manipulation commands on top of Lua
and I would like to have them be as Matlab like as possible.
Is it possible to somehow have Lua read the syntax

x[-5:5] 

and have that passed to the gettable tag method (or settable?)
So far I have done this:

x[{-5,5}]

because it will pass a single object (the table) but not multiple
objects as in x[-5,5].  The reason I want to use this syntax is that
because there is both a gettable and settable tag method I can
use the same syntax for assigning and reading a location.  Does
creating the table for each access of the element slow down Lua
significantly?

Thank you

Dan Marks
dmarks@uiuc.edu