title: Variable memory space sharing?
body: <p>In a loop, the following appends <code>par.fval</code> to <code>this.filters</code> as well as whatever <code>par.T</code> starts as:</p>
  
  <pre><code>&lt;cfset par.T = this.filters /&gt;
  &lt;cfset ArrayAppend(par.T[this.name],par.fval)/&gt;
  </code></pre>
  
  <p>Provided that all variables are defined initially and <code>par.fval</code> changes with each iteration:</p>
  
  <pre><code>&lt;cfloop ...&gt;
      &lt;cfdump var="#this.filters#"/&gt;
      &lt;cfset par.T = this.filters /&gt;
      &lt;cfset ArrayAppend(par.T[this.name],par.fval)/&gt;
  &lt;/cfloop&gt;
  </code></pre>
  
  <p>Will dump <code>this.filters</code> for each iteration with the last value of <code>par.fval</code> appended.</p>
  
  <p>I am trying to figure out why as I would have assumed ColdFusion would overwrite <code>par.T</code> as an entirely new variable.</p>
  
  <p>Narrowing it down to remove logic:</p>
  
  <pre><code>filtersA: 
  &lt;cfdump var="#this.filters#"&gt;
  &lt;cfset par.T = #this.filters# /&gt;
  &lt;cfset ArrayAppend(par.T[this.name],par.fval)/&gt;
  
  filtersB: 
  &lt;cfdump var="#this.filters#"&gt;
  </code></pre>
  
  <p>Will show that <code>par.fval</code> has been appended to <code>this.filters</code> across that append statement. So for whatever reason, <code>par.T</code> appears to not become its own variable instead being a reference to the memory space of the <code>this</code>.</p>