At 02:57 2015-07-30, Laurie Alvey <[email protected]> wrote:
Interesting. If I issue ? CAST(8E9 As I) it displays a negative 9 digit
number (-589934592). Also, I thought the limit for 32 bit integers was
about 2E9.

That is the limit, yes, but your value overflowed. The cast stripped the bits above bit 31 giving the value that you see.

You can see the bits by using Windows Calculator, setting to programmer view, and entering 8000000000. The binary display will show you that bit 31 is set and, thus, the number is negative.

[snip]

Sincerely,

Gene Wirchenko


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to