You can either get the keys as an array or a list, and then sort the list
using the appropriate sort function. For example, to get it as an array,
you could use:
<CFSET KeyArray = ArraySort(StructKeyArray(structure),"textnocase","desc")>
Chris Evans
[EMAIL PROTECTED]
http://www.fuseware.com
-----Original Message-----
From: Ric Smith [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 26, 2000 2:25 PM
To: [EMAIL PROTECTED]
Subject: sorting a structure
Is there any way to sort a CF Struct like you
can a perl associative array using sort and keys.
I'm basicly reading in a bunch of words and
creating a struct element for each word with
the key being the word. If the key already
exists then I just increment the value of that
element. I then want to order the elements
desc. I guess i could use and array and arraysort.
hmmm.
Any help is appreciated. Thanks.
Ric Smith
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.