title: In a Coldfusion cfc, what is the scope name for variables set outside of a function?
body: <p>In a Coldfusion component / CFC, I want to properly scope some variables to be available for all contained functions, but to be hidden or blocked from outside scripts. What is the name of the cfc's memory scope? Is it 'variables'? Is that available inside a contained function? Is it blocked from outside the cfc?</p>
  
  <p>(Examples in CF 8)</p>
  
  <p>Calling page:</p>
  
  <pre><code>&lt;cfset settings = structNew()&gt;
  &lt;cfset util = createObject("component", "myUtils").init(settings)&gt;
  &lt;cfoutput&gt;
      #util.myFunction()#
  &lt;/cfoutput&gt;
  </code></pre>
  
  <p>myUtils.cfc:</p>
  
  <pre><code>&lt;cfcomponent&gt;
  &lt;!--- Need to set some cfc global vars here ---&gt;
  
      &lt;cffunction name="init" access="public"&gt;
          &lt;cfargument name="settings" type="struct" required="no"&gt;
          &lt;!--- I need to merge arguments.settings to the cfc global vars here ---&gt;
          &lt;cfreturn this&gt;
      &lt;/cffunction&gt;
  
      &lt;cffunction name="myFunction" access="public"&gt;
          &lt;cfset var result = ""&gt;
          &lt;!--- I need to access the cfc global vars here for init settings ---&gt;
          &lt;cfreturn result&gt;
      &lt;/cffunction&gt;
  &lt;/cfcomponent&gt;
  </code></pre>
  
  <p>Additional best practice suggestions are welcomed. It's been quite a while since I've done this. Thanks in advance.</p>