ice78991
Programmer
- Nov 20, 2006
- 216
Question 1:
Within a <cffunction> there are 2 declarations
<cfset var someVar = 1>
and
<cfset someVar1 = 50>
Is it correct to say that someVar is only acccessible within the same <cffunction> whereas someVar1 will be accessible within all <cffunctions> contained in the cfc AND also accessible in any cfcs that extend this cfc
Question 2:
I have also seen cfcs that begin with the line
<cfset init()>
where init() will return the handle of a struct created with structNew()
For example
<cfset instance = structNew()>
<cfreturn instance>
What would the scope of instance be here ? Accessible within all cffunctions of this cfc and any cfcs that extend this cfc ( ie the same effect as <cfset someVar1 = 50> ) ?