lua-users home
lua-l archive

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


I am looking for a way to pass table assignments directly in
a function call.  Given that a varargs function simply produces
a table 'arg', I was hoping this might have been possible.
I am trying to achieve syntax like:

function xyzzy(...)

a = xyzzy(A = 1, B = 2)

Is there any way to achieve this?  I currently have:

function xyzzy(tbl)

a = xyzzy({ A = 1, B = 2})

But as these calls are for end-user (ie non-programmer) usage,
I really want to reduce the confusion and clutter of the extra
braces if possible.


Love, Light and Peace,
- Peter Loveday
eyeon Software