asort array but on row

asort array but on row

Postby Silvio.Falconi » Fri Sep 13, 2019 1:23 pm

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 ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: asort array but on row

Postby nageswaragunupudi » Fri Sep 13, 2019 4:33 pm

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10653
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: asort array but on row

Postby Silvio.Falconi » Fri Sep 13, 2019 5:10 pm

I must sort it before to show it into a xbrowse
I have the array aData
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: asort array but on row

Postby nageswaragunupudi » Fri Sep 13, 2019 5:22 pm

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

Browse adata
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10653
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: asort array but on row

Postby Silvio.Falconi » Fri Sep 13, 2019 5:45 pm

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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: asort array but on row

Postby MGA » Fri Sep 13, 2019 6:34 pm

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
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: asort array but on row

Postby Silvio.Falconi » Sat Sep 14, 2019 7:37 am

Not run ok
the array is not asort

Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: asort array but on row

Postby Silvio.Falconi » Mon Sep 16, 2019 8:21 am

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 ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: asort array but on row

Postby byte-one » Mon Sep 16, 2019 8:37 am

ASort( aRow, 2, nil, { |x,y| val(x) > val(y) } )
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: asort array but on row

Postby Silvio.Falconi » Mon Sep 16, 2019 12:08 pm

oopps good!!
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 76 guests