|
| Sort array within array |
 |
Fri, 01 Feb 2008 17:19:46 -050 |
Hi,
In the web application I'm doing, I need to sort an array that is inside another
array. I know how to sort a simple array with arrayname.sort(row to sort,rows to
be sorted) but I don't know how to do it with the array that is inside. The row
I need to sort in arrayname[X,Y][S,25] is the 25. Any idea?
Thank you.
|
| Post Reply
|
| Re: Sort array within array |
 |
Sat, 2 Feb 2008 00:05:39 -0500 |
In article <9hcXNCSZIHA.940@news-server>, horacioeg@yahoo.com says...
> Hi,
> In the web application I'm doing, I need to sort an array that is inside
another array. I know how to sort a simple array with arrayname.sort(row to
sort,rows to be sorted) but I don't know how to do it with the array that is
inside. The row I need to sort in arrayname[X,Y][S,25] is the 25. Any idea?
> Thank you.
> Horacio Echeverria
>
Horacio,
For arrayname[X,Y][S,25] you can sort:
Situation A
-----------
arrayname.sort( ) // as you said
Situation B
-----------
// if x is an array, you can do this
x = arrayname[X,Y][S,25]
x.sort( )
Situation C
-----------
// If you have arrayname[X,Y] with the X,Y being the correct
arrayname[X,Y].sort( )
// or
x = arrayname[X,Y]
x.sort( )
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada
.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
|
| Post Reply
|
| Re: Sort array within array |
 |
Sat, 02 Feb 2008 13:56:22 -050 |
Thanks Geoff. I will give it a try. I'll Let you know how it went.
Horacio
Geoff Wass [dBVIPS] Wrote:
> In article <9hcXNCSZIHA.940@news-server>, horacioeg@yahoo.com
says...
> > Hi,
> > In the web application I'm doing, I need to sort an array that is
inside another array. I know how to sort a simple array with arrayname.sort(row
to sort,rows to be sorted) but I don't know how to do it with the array that is
> inside. The row I need to sort in arrayname[X,Y][S,25] is the 25. Any idea?
> > Thank you.
> > Horacio Echeverria
> >
>
>
> Horacio,
>
> For arrayname[X,Y][S,25] you can sort:
>
> Situation A
> -----------
> arrayname.sort( ) // as you said
>
>
> Situation B
> -----------
> // if x is an array, you can do this
> x = arrayname[X,Y][S,25]
> x.sort( )
>
>
> Situation C
> -----------
> // If you have arrayname[X,Y] with the X,Y being the correct
>
> arrayname[X,Y].sort( )
>
> // or
>
> x = arrayname[X,Y]
> x.sort( )
>
>
> --
> Geoff Wass [dBVIPS]
> Montréal, Québec, Canada
>
> .|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
> .|.|.| ---------------------------------------------------------- |.|.|.
> .|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
|
| Post Reply
|
| Re: Sort array within array |
 |
Sun, 3 Feb 2008 00:57:45 -0500 |
In article <wVapN1cZIHA.1096@news-server>, horacioeg@yahoo.com says...
> Thanks Geoff. I will give it a try. I'll Let you know how it went.
>
> Horacio
>
Horacio,
OK. Good luck!
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada
.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
|
| Post Reply
|
| Re: Sort array within array |
 |
Tue, 05 Feb 2008 13:46:48 -050 |
Hi Geoff,
Now it is working. I did:
arreglo_p16[C,3].sort(25)
where C,3 is the element in the main array that contains another array that is
sorted on the column 25.
Thanks again,
Horacio
Geoff Wass [dBVIPS] Wrote:
> In article <wVapN1cZIHA.1096@news-server>, horacioeg@yahoo.com
says...
> > Thanks Geoff. I will give it a try. I'll Let you know how it went.
> >
> > Horacio
> >
>
> Horacio,
>
> OK. Good luck!
>
> --
> Geoff Wass [dBVIPS]
> Montréal, Québec, Canada
>
> .|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
> .|.|.| ---------------------------------------------------------- |.|.|.
> .|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
|
| Post Reply
|
|
|