[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Possible bug in MS_ASMTRICK? (Lua 5.2)
- From: KHMan <keinhong@...>
- Date: Mon, 22 Apr 2013 09:45:52 +0800
On 4/22/2013 4:26 AM, [ex] wrote:
I'm using Lua 5.2 as the foundation of my own language (Killa).
alert(9.9 | 0); // Alerts 9. (x|0) is used a lot in JS to
the code in Lua:
print(bit32.bor(9.9, 0)) -- prints 10, not 9
releases to do so. Non-integers for a bitwise function? This is
like texting while driving... :-)
Just use math.floor in Lua.
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia