Ok, I've been reading a bit. http://www.openbd.org/manual/?/cfc_variables

The last code chunk leaves me with some questions.

At the top of the code, variable 'returnString' is set and VAR scoped.

 <cfset var returnString = "" />

However, at the bottom, the 'returnString' variable is not called or
set with 'var'.

  <cfloop index="i" from="1" to="10" step="1">
      <cfset returnString = returnString & "Loop iteration #i#<br />" />
    </cfloop>

    <cfreturn returnString />

Question. Once you 'var' scope a variable in a function, do any calls
to that variable name within that function default to the 'var' scoped
one?

I'm just wondering how that would work. Within a parent document, you
have a variable 'returnString', and that parent document calls a
function that has a 'var' scoped variable named 'returnString' as
well. Which one gets used when the function calls 'returnString' ??

-- 
online documentation: http://openbd.org/manual/
 http://groups.google.com/group/openbd?hl=en

Reply via email to