lua-users home
lua-l archive

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


> What I meant was: I would prefer separate operators // and %% (integer division and modulo) over /%. The reason: there are no combined operators +-, */, <> etc. either…. you get the idea  ;-)

There is no need for an integer modulo operator. Like all arithmetic
operations except division, the modulo of two integers is always an
integer. So, modulo can follow the generic rule: modulo of two integers
results in an integer, modulo of anything else results in a float.

-- Roberto