This is not true.  :)  The StructClear() function does the exact same thing
your loop does - it completely empties the structure of both keys and values
(data).  Don't believe me?  Try it:

<CFSET Bag=StructNew()>
<CFLOOP FROM="1" TO="100" INDEX="i">
  <CFSET Bag[i]=i>
</CFLOOP>
<CFOUTPUT><P>#StructCount(Bag)#</P></CFOUTPUT>
<CFSET StructClear(Bag)>
<CFOUTPUT><P>#StructCount(Bag)#</P></CFOUTPUT>

You will get the following result:
100
0

-Rick

-----Original Message-----
From: Jeremy Allen [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 01, 2000 12:49 PM
To: [EMAIL PROTECTED]
Subject: RE: StructClear


StructDelete(structure, key) :)

If you wanted to clear the structe you COULD

<CFLOOP COLLECTION="structFoo" ITEM="i">
        <CFSET StructDelete(structFoo, i)>
</CFLOOP>

And you are left with a mere shell of
the structure you once had <G> :)

Or you can use StructClear which clears
out the *data* only.

Jeremy

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
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.

Reply via email to