Difference between revisions of "Category:Variables"

245 bytes added ,  20:52, 9 March 2018
no edit summary
imported>JOG
(I'm not starting an edit war over this, but NOW the page is wrong and misleading. DOUBLEs can store 32 bit longs perfectly fine and longs behave like longs from the modder's POV)
imported>Lubronbrons
 
(One intermediate revision by one other user not shown)
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==
 
[[Introduction to OBSE arrays]]
[[Introduction to OBSE arrays]]


Anonymous user