lua-users home
lua-l archive

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


>> There is no direct conversion from strings to integers:
>> If a string is provided where an integer is needed,
>> Lua converts the string to a float and then the float to an integer.
Does it mean the following:
assert('100000000000000001'%2 == 0)
It looks unnaturally for a language having 64-bit integers as native datatype.

>> Integer division (//) converts its operands to integers
Does it mean the following:
assert(4.5//1.5 == 4)
I was expecting 3 as the result of 4.5//1.5