SortArray sort string value with numbers
Hi!
I have made a sort function to sort a struct.
In the struct i have a field called value (string)
In one scenario this field (value) is filled with numbers only, 100, 107, 106, 96
Sorting it will result in this, 100, 106, 107, 96
How can I make 96 end up first?
Code:
Function SortSuiteSizes stJSArticleAttributeInfo attributes1 stJSArticleAttributeInfo attributes2 Returns Integer
If (attributes1.Value > attributes2.Value) ;
Function_Return (GT)
If (attributes1.Value < attributes2.Value) ;
Function_Return (LT)
Function_Return (EQ)
End_Function
Martin Arvidsson, Data Martin i Kungsbacka AB
I have six locks on my door all in a row. When I go out, I lock every other one. I figure no matter how long somebody stands there picking the locks, they are always locking three.