- Code: Select all Expand view
- REQUEST HB_CODEPAGE_ITWIN
FUNCTION MAIN()
LOCAL aData[ 7 ]
LOCAL i
HB_SETCODEPAGE( "ITWIN" )
aData[ 1 ] = { "TEST1", 3107.77 }
aData[ 2 ] = { "TEST2", 852.07 }
aData[ 3 ] = { "TEST3", 191.00 }
aData[ 4 ] = { "TEST4", 148.68 }
aData[ 5 ] = { "TEST5", 44.73 }
aData[ 6 ] = { "TEST6", 15.24 }
aData[ 7 ] = { "TEST7", 255.65 }
ASORT( aData, , , { | aItem1, aItem2 | Descend( Str( aItem1[ 2 ], 10, 2 ) ) + aItem1[ 1 ] < Descend( Str( aItem2[ 2 ], 10, 2 ) ) + aItem2[ 1 ] } )
FOR i = 1 TO LEN( aData )
? aData[ i, 1 ], aData[ i, 2 ]
NEXT
INKEY( 0 )
RETURN NIL
Result:
- Code: Select all Expand view
- TEST1 3107.77
TEST2 852.07
TEST5 44.73
TEST6 15.24
TEST7 255.65
TEST4 148.68
TEST3 191.00
Any workaround?
EMG