[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (work2) now available
- From: Egor Skriptunoff <egor.skriptunoff@...>
- Date: Sat, 22 Mar 2014 16:09:26 +0300
>> 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