No you do not need to declare an array in this case. It is not actually an
array; it is just called "array notation" because it is the same syntax you
would use on an array. FORM is actually a predefined structure/collection
(aka 'scope')... such as URL or VARIABLES scopes

Most variables that you can reference as scope.variable, you can reference
as scope[variable]
 
In your last example: <cfset LegalProteinSequence_#LoopCount# =  ...

You are right, that does not work. You can do one of the following instead:

<cfset "LegalProteinSequence_#LoopCount#" =  ...

<cfset variables["LegalProteinSequence_#LoopCount#"] =  ...

<cfset variables["LegalProteinSequence_" & LoopCount] =  ...
 


.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
-----Original Message-----
From: Rick Colman [mailto:rcol...@cox.net] 
Sent: Tuesday, September 28, 2010 3:42 PM
To: cf-talk
Subject: Re: arrays and looping around


  so, do I need to declare an array in advance, or is this implicit.

so, I guess this does not work either:

<cfset LegalProteinSequence_#LoopCount# =  ...

On 9/27/2010 10:10 PM, Ian Skinner wrote:
> On 9/27/2010 7:37 PM, Michael Grant wrote:
>> #form['ExpOrg_ID_'&   loopCount]#
>>
> A.K.A. "Array Notation" and can be applied to any variable scope, not
> just the form scope, though that is probably the most common.
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337622
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to