Difference between revisions of "Long Integer"

Jump to navigation Jump to search
255 bytes added ,  17:04, 17 September 2006
global longs are floats
imported>DragoonWraith
m (Variable types: longint moved to Long Integer)
imported>DragoonWraith
(global longs are floats)
Line 1: Line 1:
'''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).
'''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).


However, in Oblivion, all longs are actually stored as [[Variable types: floating point|floats]], so they experience the same limitations as floats, and so cannot actually reach the ranges that a long should be able to reach (see the float article for more information).
However, in Oblivion, all longs are actually stored as [[Variable types: floating point|floats]], so they experience the same limitations as floats, and so cannot actually reach the ranges that a long should be able to reach (see the float article for more information on float's limitations; see the Discussion here for information on how this was discovered).
 
If a Global long is declared, it will actually behave as a float, and so will not round off decimal values like it should. In other situations, it will round off.


[[Category:Variables]]
[[Category:Variables]]

Navigation menu