title: How can I create a local alias for a variable?
body: <p>There's a constant <code>OutputFormatter._outputMaxLength</code> which I use a lot in this particular scope, and to make my code more compact and descriptive I want to do</p>
  
  <pre><code>int linelen = OutputFormatter._outputMaxLength;
  </code></pre>
  
  <p>except I want <code>linelen</code> to be a reference to <code>OutputFormatter._outputMaxLength</code>, not a copy of its value. I.e., I want to do the equivalent of </p>
  
  <pre><code>int * linelenptr = &amp;OutputFormatter._outputMaxLength;
  </code></pre>
  
  <p>in C/C++;</p>
  
  <p>I realize that since <code>linelen</code> is just an <code>int</code>, this doesn't save any memory; like I said, it's for the mere purpose of compactness and readability. </p>