#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 Changed 16 years ago by TicketCleanup
- Milestone Future Release deleted
comment:2 Changed 16 years ago by Jos
- Resolution set to No Bug
- Status changed from new to closed
Looks good to me.
Please use our forums for questions or when you are not sure you found a bug.
Jos
comment:3 follow-up: ↓ 4 Changed 16 years ago by Jpm
Sorting string is different from sorting number ...
Just use the type you need
comment:4 in reply to: ↑ 3 Changed 16 years ago by timsky
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 :)
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.
Automatic ticket cleanup.