[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Is there a way to let lua 5.1.4 support data type(UInt32/Int64/UInt64)
- From: "陶陶" <taozuhong@...>
- Date: Wed, 18 Nov 2009 14:53:47 +0800
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