lua-users home
lua-l archive

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


Why? integer too long?

D:\work\mod_luaex\etc>d:\work\luabuild\bin\Win32Debug\lua5.1
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> i = 0x100000000000000
> print(i)
4294967295
> print( 0x100000000000000)
4294967295
> print( 0x10000000000000000)
4294967295
> print( 0x1000000000000000000)
4294967295
> print( 0x100000000000000000000)
4294967295
> print( 0x100000000000000000000)
^C终止批处理操作吗(Y/N)?
^C
D:\work\mod_luaex\etc>\work\luajit-2.0\bin\luajit.exe
LuaJIT 2.0.0-beta8 -- Copyright (C) 2005-2011 Mike Pall. http://luajit.org/
JIT: ON CMOV SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc fuse
> print(0x100000000000000000000)
stdin:1: malformed number near '0x100000000000000000000'
> print(0x100000000000000000)
stdin:1: malformed number near '0x100000000000000000'
> print(0x1000000000000000)
stdin:1: malformed number near '0x1000000000000000'
> print(0x10000000000000)
stdin:1: malformed number near '0x10000000000000'
> print(0x100000000000)
stdin:1: malformed number near '0x100000000000'
> print(0x1000000000)
stdin:1: malformed number near '0x1000000000'
> print(0x10000000)
268435456
>