Am I missing something here?
Try this

<cfset fred = structNew()>
<cfset fred["001"] = "freddy">
<cfloop collection="#fred#" item="idx">
  <cfoutput>#idx# #fred[idx]#</cfoutput>
</cfloop>

Then try this

<cfset 001 = "freddy">
<cfoutput>#001#</cfoutput>

Nick

-----Original Message-----
From: Simon Horwith [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 4:27 PM
To: CF-Talk
Subject: RE: Structures can't use integers as keys - why?


By it's simplest definition, a structure keyname is a variable name.  The
same rules apply to keynames that apply to variable names, and for the same
reasons.

~Simon

> Simon Horwith
> Allaire Certified ColdFusion Instructor
> Certified ColdFusion Developer
> Fig Leaf Software
> 1400 16th St NW, # 220
> Washington DC 20036
> 202.797.6570 (direct line)
> www.figleaf.com
> 


-----Original Message-----
From: Park, Simon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 11:18 AM
To: CF-Talk
Subject: Structures can't use integers as keys - why?


What is the reasoning that you can't use integers as keys of structures? I
understand that arrays might serve this purpose. However, if I am throwing
the results of a DB query into a complex data structure, I would like the
use the primary key values, which are often not consecutive, as the
reference point to the data. 

Simon Park
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to