Opened on May 11, 2009 at 12:09:39 AM
Closed on May 11, 2009 at 7:07:13 AM
Last modified on May 11, 2009 at 9:35:39 PM
#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>
$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 , on May 11, 2009 at 3:00:01 AM
| Milestone: | Future Release |
|---|
comment:2 by , on May 11, 2009 at 7:07:13 AM
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
Looks good to me.
Please use our forums for questions or when you are not sure you found a bug.
Jos
follow-up: 4 comment:3 by , on May 11, 2009 at 9:59:45 AM
Sorting string is different from sorting number ...
Just use the type you need
comment:4 by , on May 11, 2009 at 9:35:39 PM
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 :)

Automatic ticket cleanup.