Modify

Opened 4 years ago

Closed 4 years ago

#3800 closed Bug (Fixed)

Number() - case sensivity with scientific notation by using $NUMBER_AUTO

Reported by: AspirinJunkie Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Number scientific Cc:

Description

Following Script:

$sIntUpper = "12345E5"
$sIntLower = "12345e5"

$sFloatUpper = "1.2345E5"
$sFloatLower = "1.2345e5"

ConsoleWrite(StringFormat("\n     xxx -> Number(xxx)\n% 8s -> %10d (Type: %s)\n% 8s -> %10.0f (Type: %s)\n% 8s -> %10.0f (Type: %s)\n% 8s -> %10.0f (Type: %s)\n\n", _
        $sIntUpper, Number($sIntUpper), VarGetType(Number($sIntUpper)), _
        $sIntLower, Number($sIntLower), VarGetType(Number($sIntLower)), _
        $sFloatUpper, Number($sFloatUpper), VarGetType(Number($sFloatUpper)), _
        $sFloatLower, Number($sFloatLower), VarGetType(Number($sFloatLower)) ))

produces:

     xxx -> Number(xxx)
 12345E5 ->      12345 (Type: Int32)
 12345e5 -> 1234500000 (Type: Double)
1.2345E5 ->     123450 (Type: Double)
1.2345e5 ->     123450 (Type: Double)

The capitalized letter "E" is recognized as an exponential character only if a decimal separator appears before it.

This is not the case for the lowercase "e".

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by Jpm

  • Resolution set to Fixed
  • Status changed from new to closed

Already solver for the next Beta/Release

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 ticket will remain with no owner.
Author


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

 
Note: See TracTickets for help on using tickets.