lua-users home
lua-l archive

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


Why not modify the % operator? It could return two values; the remainder first (as it does now), and then the integer division second.

This would not introduce a new metamethod. It would make the integer division a bit awkward, but not by much:

a = b /% c

vs

_,a = b % c