lua-users home
lua-l archive

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

> I realize that jgl:line(2., 3., 4., 5.); is like calling jgl.line(jgl,
> 2., 3., 4., 5.); but why would the first argument to my function be
> dropped in the former case and not in the latter?

The first argument is being dropped in both cases. The difference is that in
jgl.line(2,3,4,5), "2" is being dropped, while in jgl:line(2,3,4,5), which
is equivalent to jgl.line(jgl,2,3,4,5) as you noted, "jgl" is being dropped.


A mathematician is a device for turning coffee into theorems.
        -- P. Erdos 

Luis Carvalho
Applied Math PhD Student - Brown University
PGP Key: E820854A <>