lua-users home
lua-l archive

Re: Lua 5.3: functional version of // operator?

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


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.

AltStyle によって変換されたページ (->オリジナル) /