Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Int64
Tue, Feb 26 2013 7:14 AMPermanent Link

Matthew Jones

A quick check shows that Javascript doesn't have anything other than "numbers",
which are basically floating point values. If I need to be sure of an Int64 working,
is there anything I need to do? I'm actually, I think, just comparing against a
stored value to see if it has changed, so that should work I guess, but is there
anything I should know?

/Matthew Jones/
Tue, Feb 26 2013 12:28 PMPermanent Link

Raul

Team Elevate Team Elevate

Matthew,

Correct - everything is stored as float. Max integer can be checked by Number.MAX_VALUE and anything above is infinity.

as per following link the actual value is : +/- 9007199254740992

http://stackoverflow.com/questions/307179/what-is-javascripts-max-int-whats-the-highest-integer-value-a-number-can-go-t

hence if you actually have Int64 numbers there is a potential that your JS cant represent it - i know of no workaround other than changing the source to not be int64.

Raul


<<
(Matthew Jones) wrote:

A quick check shows that Javascript doesn't have anything other than "numbers",
which are basically floating point values. If I need to be sure of an Int64 working,
is there anything I need to do? I'm actually, I think, just comparing against a
stored value to see if it has changed, so that should work I guess, but is there
anything I should know?
>>
Tue, Feb 26 2013 2:43 PMPermanent Link

Matthew Jones

Thank you for the confirmation. As it happens, it is good for me as the system I am
using uses Int64 (one day we think it may have that much data!) but the browser
shouldn't need that detail, so I am truncating the value using "and $7fff" on the
server. This is working (I've hacked the numbers to be bigger than Int32) just fine.


/Matthew Jones/
Image