lua-users home
lua-l archive

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


I have a question: How can I implement "arithmetic-assignment
operators"(not sure on the exact term) like += and /= ?
For clarification, a+=b is the same as a=a+b. However I've some users which
want to be able to do += directly.

I've looked at the source, and the biggest obstacle I can see(I think) is
how to determine whether to use setglobal, setlocal, or settable for the

Maybe anybody already has an implementation of this or knows how to do it?

Staffan Hellström