Hi mich,
Well that's an interesting development. Windows behavior aside, DIAdem still sorts strings alphabetically, according to the ASCII table. In order to sort a set of strings by the numeric value of the last part of each string, you would need to create a parallel array of that last part of each string, then perform numeric comparisons to do the ordering of both arrays simultaneously. Here's an example of a simple bubble sort approach:
NamesToSort = Array("Name_1", "Name_10", "Name_15", "Name_20", "Name_2")
NumsToSort = Array(1, 10, 15, 20, 2)
Call BubbleSortNums(NamesToSort, NumsToSort)
MsgBox Join(NamesToSort, vbCRLF)
Sub BubbleSortNums(NamesToSort, NumsToSort)
Dim i, SwapName, SwapNum, Swapped
Do ' Until bubble sort of NamesToSort() is finished
Swapped = False
FOR i = 0 TO UBound(NamesToSort)-1
IF CDbl(NumsToSort(i)) > CDbl(NumsToSort(i+1)) THEN
SwapName = NamesToSort(i)
SwapNum = NumsToSort(i)
NamesToSort(i) = NamesToSort(i+1)
NumsToSort(i) = NumsToSort(i+1)
NamesToSort(i+1) = SwapName
NumsToSort(i+1) = SwapNum
Swapped = True
END IF ' Name(i) and Name(i+1) need to be swapped
NEXT ' i
Loop Until NOT (Swapped)
End Sub ' BubbleSort()
Brad Turpin
DIAdem Product Support Engineer
National Instruments