I have this array
AaDd(atemp,{strzero(n,4),;
SP->elemento,;
SP->desc,;
SP->settore,;
nGiorni,;
aPrices[k],;
lIslock,;
aListini[k][2] } )
the user found problems to modify the price and he wish see before specific strings (col2+col4)
before all "Ombrellone" and sectors
then all "Palma" and sectors
and then all "Cabina" and sectors
I made ASORT( aData,,, { |x,y| x[3] } ) but not run ok
Order an array
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Order an array
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Re: Order an array
Try something like this: ASORT( aData,,, { |x,y| x[3] < y[3] } )
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Order an array
thanks
this ordered on alphabetic order on first column
"Cabina" then "Ombrelone" then "Palma"
I found a solution with ASORT( aData,,, { |x,y| x[3] > y[3] } )
this ordered on alphabetic order on first column
"Cabina" then "Ombrelone" then "Palma"
I found a solution with ASORT( aData,,, { |x,y| x[3] > y[3] } )
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC