lua-users home
lua-l archive

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


How about require "intop" (like bitop).

There must be something other than idiv that would be handy. (Can't
think of it though.)


On Mon, Jul 8, 2013 at 7:21 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> 2013/7/8 Rena <hyperhacker@gmail.com>:
>
>> Nothing prevents you from assigning to math.idiv either.
>
> I like semi-global variables, i.e. local variables whose scope is
> the entire file, visible as upvalues everywhere.
>
>    local idiv = require"idiv"
>
> I'll go with Sean's modification: an idiv module for Lua 5.2 providing
> a function that returns quotient and remainder. A math.idiv in Lua 5.3
> is not really necessary: the 5.2/5.3 compatibility code can go into the
> module source. But since work1 is the one time when the developers are
> asking us, put the request on the wishlist by all means.
>



-- 
David Burgess