#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 , 17 years ago
| Milestone: | Future Release |
|---|
comment:2 by , 17 years ago
| 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 , 17 years ago
Sorting string is different from sorting number ...
Just use the type you need
comment:4 by , 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 :)

Automatic ticket cleanup.