[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
**Subject**: **Re: Hidden integers...**
**From**: "Ben Cooley" <benc@...>
**Date**: Wed, 18 Apr 2001 01:15:50 -0700

Native integer support in lua...
Addendum:
Integer division with the / operator would aways return a number, NOT an
integer. For integer division resulting in an integer result and remainder
you would need to use the idiv(a,b) function.
i.e.
i = 100 / 2
would return the number 50.0.
while
i,r = idiv(101,2)
would return the integers 50 and 1 respectively.
Functions:
i = imod(a,b)
Would return the integer modulus of the values passed in a and b.