Sort an Array?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

Sort an Array?

Post by bjb007 » Fri Jun 20, 2008 1:34 pm

Is there a command/function in Rev
to sort an array?

Tried "sort container" and various
combinations of "combine" but nothing
works for me.
Life is just a bowl of cherries.

rozek
Posts: 151
Joined: Mon Jun 19, 2006 2:29 pm
Contact:

Post by rozek » Fri Jun 20, 2008 1:37 pm

Well,

it seems as if you would have to "combine" the array into a list, sort that and "split" the result into an array again...

If you are uncertain about the contents of your array, you may additionally use URLencode and URLdecode - although your code might become inefficient then.
Kind regards,

Andreas Rozek

bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

Post by bjb007 » Fri Jun 20, 2008 8:12 pm

rozek
Confirms my deduction too but the
"combine" function includes a sort
line...

"sort lines of monthlyReceivables by item 2 of each"

but can't get it to do anything.

Some array functions are available in
RevOnline as LibArrayUtil 1.0 under
user benJam.

It's no longer supported and the
pdf isn't available from the link given
but Ben kindly sent me a copy. If you'd like
it let me know.
Life is just a bowl of cherries.

Post Reply