> are values in structures case sensitive?

Values in any variable in CF are "case-sensitive" in the sense that CF
stores them in the case in which they're created. Keys within structures
(keys being the variable names within structures), are not case-sensitive,
and if you loop over keys and output them, the keys themselves will be
output in all caps. The values for those keys, as mentioned above, will be
whatever you put in them originally. Here's a demo. Just copy this into a
cfm file, and run it:

<!--- structuredemo.cfm --->
<cfscript>
mystruct = StructNew();
mystruct["First Stooge"] = "Larry";
mystruct["Second Stooge"] = "Curly";
mystruct["Third Stooge"] = "Moe";
</cfscript>

<cfloop collection="#mystruct#" item="ThisStooge">
        <cfoutput>
        #ThisStooge# : #mystruct[ThisStooge]#<br>
        </cfoutput>
</cfloop>
<!--- end structuredemo.cfm --->

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to