lua-users home
lua-l archive

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


Hi all,
 
I have met a trouble about big integer(UInt32/Int64/UInt64), the detail as follow:
I use tolua++ encapsulation c++ class to lua script, but it lost the data(just 0 or -1), because lua use double store all numeric data in default.
 
Is there a way to let lua 5.1.4 support data type(UInt32/Int64/UInt64),  could some guys can give me some example code?
 
thanks in advanced.
 
the follow is found in msdn:
The double type contains 64 bits: 1 for sign, 11 for the exponent, and 52 for the mantissa. Its range is +/–1.7E308 with at least 15 digits of precision.
long long(Int64): 1 for sign, 63 for numeric value
unsigned long long(UInt64): 64 for numeric value
------------------
Andy Tao[陶祖洪]
祖洪测试自动化 http://www.zuhong.cn
天是圆的,地是方的,凡事都要有个规矩!