Difference between revisions of "Category:Variables"

Jump to navigation Jump to search
246 bytes added ,  19:52, 9 March 2018
no edit summary
imported>JOG
(The issue is that all arithmetic operation are done as floating point operations with single precision, thus longs are cut to the 24bit mantissa when you use these. Boolean operations work fine.)
imported>Lubronbrons
 
Line 16: Line 16:


Other than that, however, generally [[Long Integer|longs]] and [[Short Integer|shorts]] will be rounded off to the nearest integer (i.e. 1.25 becomes 1, 1.75 becomes 2), while [[Floating Point|floats]] will store the decimal data. However, if a variable is a Global, then it will ''always'' be a [[Floating Point|float]] and therefore will not round off the decimal values.
Other than that, however, generally [[Long Integer|longs]] and [[Short Integer|shorts]] will be rounded off to the nearest integer (i.e. 1.25 becomes 1, 1.75 becomes 2), while [[Floating Point|floats]] will store the decimal data. However, if a variable is a Global, then it will ''always'' be a [[Floating Point|float]] and therefore will not round off the decimal values.
NOTE : Long ago, an OBSE developer mentioned that, internally, the engine stores ALL vars as floats. (QQuix) so it is no problem if you set short value above 32767, the maximum limit positive number is 2,147,483,647 (or hexadecimal 7FFF,FFFF16)


==See Also==
==See Also==
Anonymous user

Navigation menu