Difference between revisions of "Long Integer"
Jump to navigation
Jump to search
imported>JOG m |
imported>ShadowDancer m (typo) |
||
Line 3: | Line 3: | ||
The highest bit is the sign, so the variable ranges from -2^31 (-2147483648) to 2^31-1 (2147483647) | The highest bit is the sign, so the variable ranges from -2^31 (-2147483648) to 2^31-1 (2147483647) | ||
There are no restrictions when using a long as a local variable within [[Object scripts]], but longs inside [[Quest scripts]], as well as [[Globals|global]] variables, are internally stored as [[Variable_types:_floating_point|floating point]] and there might be a | There are no restrictions when using a long as a local variable within [[Object scripts]], but longs inside [[Quest scripts]], as well as [[Globals|global]] variables, are internally stored as [[Variable_types:_floating_point|floating point]] and there might be a precision issue with very large values. | ||
[[Category:Variables]] | [[Category:Variables]] |
Revision as of 14:45, 21 July 2006
Long is an integer format that uses 32 bit for data.
The highest bit is the sign, so the variable ranges from -2^31 (-2147483648) to 2^31-1 (2147483647)
There are no restrictions when using a long as a local variable within Object scripts, but longs inside Quest scripts, as well as global variables, are internally stored as floating point and there might be a precision issue with very large values.