Hi
to sort a UDT array in the right way. I´ve to mirror the string
variable first.eg:
type te
e as quad
end type
dim c(1 to 10) as te
'fill the array c(1).e=1234567890123 ....
then I get with ?c(1) = " a3b" ' only example
and I need "b3a " to sort right
and I do it slowly with:
h$=mid$(c(1),8,1)+mid$(c(1),7,1)+mid$(c(1),6,1)+mid$(c(1),5,1)+_
mid$(c(1),4,1)+mid$(c(1)3,1)+mid$(c(1),2,1)+mid$(c(1),1,1)
then i can sort the array with
array sort c(), descend
and I use the array for an index.
Before using I need to mirror the key´s again.
How can I mirror the key´s quicker ?
(rotate and shift will not work)
Regards
Matthias Kuhn
------------------
to sort a UDT array in the right way. I´ve to mirror the string
variable first.eg:
type te
e as quad
end type
dim c(1 to 10) as te
'fill the array c(1).e=1234567890123 ....
then I get with ?c(1) = " a3b" ' only example
and I need "b3a " to sort right
and I do it slowly with:
h$=mid$(c(1),8,1)+mid$(c(1),7,1)+mid$(c(1),6,1)+mid$(c(1),5,1)+_
mid$(c(1),4,1)+mid$(c(1)3,1)+mid$(c(1),2,1)+mid$(c(1),1,1)
then i can sort the array with
array sort c(), descend
and I use the array for an index.
Before using I need to mirror the key´s again.
How can I mirror the key´s quicker ?
(rotate and shift will not work)
Regards
Matthias Kuhn
------------------
Comment