Page 1 of 1

asort array but on row

Posted: Fri Sep 13, 2019 1:23 pm
by Silvio.Falconi
I wish order an array but on row sample

Image

I wish the numbers of each row are on decrescent because I must show on dialog the number from big to minor

how I can resolve ?

Re: asort array but on row

Posted: Fri Sep 13, 2019 4:33 pm
by nageswaragunupudi
ASort( aRow, 2, nil, { |x,y| x > y } )

Re: asort array but on row

Posted: Fri Sep 13, 2019 5:10 pm
by Silvio.Falconi
I must sort it before to show it into a xbrowse
I have the array aData

Re: asort array but on row

Posted: Fri Sep 13, 2019 5:22 pm
by nageswaragunupudi
for each aRow in aData
ASort( aRow, 2, nil, { |x,y| x > y } )
next

Browse adata

Re: asort array but on row

Posted: Fri Sep 13, 2019 5:45 pm
by Silvio.Falconi
Error description: Error BASE/1003 Variabile inesistente: AROW

aPrevisti:= Calcolo_Previsione(oPrevisione,primo,ba,ca,fi,ge,mi,na,pa,rm,to,ve,nz,aRuote)

for each aRow in aPrevisti
ASort( aRow, 2, nil, { |x,y| x > y } )
next

Re: asort array but on row

Posted: Fri Sep 13, 2019 6:34 pm
by MGA
Local aRow

aPrevisti:= Calcolo_Previsione(oPrevisione,primo,ba,ca,fi,ge,mi,na,pa,rm,to,ve,nz,aRuote)

for each aRow in aPrevisti
ASort( aRow, 2, nil, { |x,y| x > y } )
next

Re: asort array but on row

Posted: Sat Sep 14, 2019 7:37 am
by Silvio.Falconi
Not run ok
the array is not asort

Image

Re: asort array but on row

Posted: Mon Sep 16, 2019 8:21 am
by Silvio.Falconi
perhaps with this picture Ucan understand why it is not asort for me

Image

See the red circles

ASort( aRow, 2, nil, { |x,y| x > y } )

How modify it ?

Re: asort array but on row

Posted: Mon Sep 16, 2019 8:37 am
by byte-one
ASort( aRow, 2, nil, { |x,y| val(x) > val(y) } )

Re: asort array but on row

Posted: Mon Sep 16, 2019 12:08 pm
by Silvio.Falconi
oopps good!!