lua-users home
lua-l archive

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



Was trying to make a/b return both integer divident and modulo, but it seems these metamethod tricks cannot return more than the return values they 'normally' would. Is this by chance of by design? I think it would be neat to have integer division provide both:

	a= b/c		-- just divident, if either 'b', 'c' or both are int32 userdata
	a,d= b/c	-- getting both divident & modulo at once.

-ak