[thelist] CF: reversing a list

Lindsay Evans lindsay at redsquare.com.au
Mon Jun 18 02:23:44 CDT 2001

try this:

tList = Reverse(list);
newList = "";

for(i = 1; i LTE ListLen(tList); i = i + 1){
	newList = ListAppend(newList, Reverse(ListGetAt(tList, i)));

list is your original list
newList will be the reversed list

 Lindsay Evans.
 Production Artist/Coder,
 Red Square Productions.

 vox: 8596.4000
 fax: 8596.4001
 web: www.redsquare.com.au

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Isaac Forman
Sent: Monday, June 18, 2001 5:01 PM
To: thelist at lists.evolt.org
Subject: [thelist] CF: reversing a list


When using ColdFusion, what's the best way to reverse a list? There appears
to be no such thing as listreverse().

reverse() obviously reverses everything exactly (including list values). ie,
"28,27" becomes "72,82".

More information about the thelist mailing list