Sorting numerical strings
Posted: Fri Dec 06, 2013 8:08 pm
Sorting a string-array gave strange but correct results considering the string-'value'
I made a 'repair' on the BubbleSort$-function for numerical strings.
The Test-program with both functions gave the following result
The program is attached to this post
I made a 'repair' on the BubbleSort$-function for numerical strings.
The Test-program with both functions gave the following result
Code: Select all
Array to be sorted:
Example -1
data -5
to -10
show -20
strange 1
but 5
correct 10
results 20
With second column sorted:
Example -1
to -10
show -20
data -5
strange 1
correct 10
results 20
but 5
With adapted sort-function:
show -20
to -10
data -5
Example -1
strange 1
but 5
correct 10
results 20