Modify ↓
#1694 closed Bug (Fixed)
Number(), Fails to return proper value for int32 value range case.
| Reported by: | mvg | Owned by: | trancexx |
|---|---|---|---|
| Milestone: | 3.3.7.20 | Component: | AutoIt |
| Version: | 3.3.6.1 | Severity: | None |
| Keywords: | number hexstring | Cc: |
Description
(split of from ticket:1519)
Number() Fails to return proper value for hex-strings that would return a int32 range value.
ConsoleWrite('> case bounderies.' & @CRLF)
ConsoleWrite('0x0000000000000001' & ' = ' & Number('0x0000000000000001') & @CRLF) ;; ZERO
ConsoleWrite('0x000000007FFFFFFF' & ' = ' & Number('0x000000007FFFFFFF') & @CRLF) ;; ZERO
ConsoleWrite('0x0000000080000000' & ' = ' & Number('0x0000000080000000') & @CRLF) ;; ok (2147483648)
ConsoleWrite('0xFFFFFFFF7FFFFFFF' & ' = ' & Number('0xFFFFFFFF7FFFFFFF') & @CRLF) ;; ok (-2147483649)
ConsoleWrite('0xFFFFFFFF80000000' & ' = ' & Number('0xFFFFFFFF80000000') & @CRLF) ;; ZERO
ConsoleWrite('0xFFFFFFFFFFFFFFFF' & ' = ' & Number('0xFFFFFFFFFFFFFFFF') & @CRLF) ;; ZERO
Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 3 CPU:X86 OS:X86)
Attachments (0)
Change History (3)
comment:2 by , on Jun 27, 2010 at 8:03:03 AM
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:3 by , on Oct 20, 2011 at 10:08:26 PM
| Milestone: | → 3.3.7.20 |
|---|---|
| Owner: | changed from to |
| Resolution: | → Fixed |
| Status: | assigned → closed |
Fixed by revision [6308] in version: 3.3.7.20
Note:
See TracTickets
for help on using tickets.

Just in case.
Same results on Number(Binary(int64)) ... assuming same problem source.
ConsoleWrite('0x0000000000000001' & ' = ' & Number(Binary(int('0x0000000000000001'))) & @CRLF) ;; ZERO ConsoleWrite('0x000000007FFFFFFF' & ' = ' & Number(Binary(int('0x000000007FFFFFFF'))) & @CRLF) ;; ZERO ConsoleWrite('0x0000000080000000' & ' = ' & Number(Binary(int('0x0000000080000000'))) & @CRLF) ;; ok (2147483648) ConsoleWrite('0xFFFFFFFF7FFFFFFF' & ' = ' & Number(Binary(int('0xFFFFFFFF7FFFFFFF'))) & @CRLF) ;; ok (-2147483649) ConsoleWrite('0xFFFFFFFF80000000' & ' = ' & Number(Binary(int('0xFFFFFFFF80000000'))) & @CRLF) ;; ZERO ConsoleWrite('0xFFFFFFFFFFFFFFFF' & ' = ' & Number(Binary(int('0xFFFFFFFFFFFFFFFF'))) & @CRLF) ;; ZEROInt() -> enforced int64 type -> 8 byte binary.