On 10/17/06, Bryan Stevenson <[EMAIL PROTECTED]> wrote:
> > <cffunction ...>
> > <cfargument ...>
> > ...
> > <cfset var q1 = "">
>
> So Dave the line above tells CF that any variable with that name (q1) will
> remain local to this method (and the cfquery call below with the same name
> doesn't change it's "scope/keyword/whatever")?

correct.  you're simply creating a variable in the method that's local
to the method.  when you do your <cfquery name="q1"> it creates the
query in that same "space".  since CF is typeless, it doesn't matter
whether or not your variable instantiation is a simple var, complex
var, etc.  it's just a variable namespace created/reserved in memory.

any variable you create afterwards that has the same name (regardless
of variable "type") will be created in that same space (which is now
local to the method that created it).

-- 
Charlie Griefer

================================================
"...All the world shall be your enemy, Prince with a Thousand Enemies,
and whenever they catch you, they will kill you. But first they must catch
you, digger, listener, runner, prince with a swift warning.
Be cunning and full of tricks and your people shall never be destroyed."

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257085
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to