lua-users home
lua-l archive

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


>The only downside (or upside, depending on your outlook) is that there's no
>way to enforce a particular function signature. So you have to use self
>discipline to make sure that all functions used as callbacks have the right
>parameters in the right order.

Or you can simulate named arguments with tables, as is
	drawline{x1=10, y1=20, x2=100, y2=200}
Here you can put the "args" in any order. But the signature of the function
drawline must be drawline(t) and you access the args via t.
--lhf