Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#950 closed Bug (No Bug)

ArraySort bug in some cases

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: 3.3.0.0 Severity: None
Keywords: Cc:

Description

Hello.

Environment = 3.3.0.0 under WIN_XP/Service Pack 3 X86

Actually I do not know how to explain this in proper english. I think my example will do this better than me:


#Include <Array.au3>

Dim $aArray[6][2]

$aArray[0][0] = 'a'
$aArray[0][1] = '15'
$aArray[1][0] = 'b'
$aArray[1][1] = '21'
$aArray[2][0] = 'c'
$aArray[2][1] = '111'
$aArray[3][0] = 'd'
$aArray[3][1] = '3'
$aArray[4][0] = 'e'
$aArray[4][1] = '1'
$aArray[5][0] = 'f'
$aArray[5][1] = '2'

_ArrayDisplay($aArray, 'RAW')
_ArraySort($aArray, 1, 0, 0, 1)
_ArrayDisplay($aArray, 'Sorted Descending by Col 1')

$aArray[0][1] = 'a'
$aArray[0][0] = '15'
$aArray[1][1] = 'b'
$aArray[1][0] = '21'
$aArray[2][1] = 'c'
$aArray[2][0] = '111'
$aArray[3][1] = 'd'
$aArray[3][0] = '3'
$aArray[4][1] = 'e'
$aArray[4][0] = '1'
$aArray[5][1] = 'f'
$aArray[5][0] = '2'

_ArrayDisplay($aArray, 'RAW')
_ArraySort($aArray, 0, 0, 0, 0)
_ArrayDisplay($aArray, 'Sorted Ascending by Col 0')


Is this a bug?

Best regards,
timsky

Attachments (0)

Change History (4)

comment:1 by TicketCleanup, 17 years ago

Milestone: Future Release

Automatic ticket cleanup.

comment:2 by Jos, 17 years ago

Resolution: No Bug
Status: newclosed

Looks good to me.
Please use our forums for questions or when you are not sure you found a bug.

Jos

comment:3 by J-Paul Mesnage, 17 years ago

Sorting string is different from sorting number ...
Just use the type you need

in reply to:  3 comment:4 by timsky, 17 years ago

Replying to Jpm:

Sorting string is different from sorting number ...
Just use the type you need

Yeah, MrCreatoR advised me to replace IsNumber by StringIsDigit in functions ArrayQuickSort2D and ArrayQuickSort1D to make it work for me.

Thank you and sorry for false bug report :)

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.