Modify

Opened 14 years ago

Closed 13 years ago

#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:1 Changed 14 years ago by mvg

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) ;; ZERO

Int() -> enforced int64 type -> 8 byte binary.

comment:2 Changed 14 years ago by Jpm

  • Owner set to Jon
  • Status changed from new to assigned

comment:3 Changed 13 years ago by trancexx

  • Milestone set to 3.3.7.20
  • Owner changed from Jon to trancexx
  • Resolution set to Fixed
  • Status changed from assigned to closed

Fixed by revision [6308] in version: 3.3.7.20

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain trancexx.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.