title: Macros constantly resulting in 'invalid name'
body: <p>I'm a newcomer to Stata after using R for a long time. </p>
  
  <p>I'm trying to perform any action which involves a macro, such as a loop and it is constantly giving me an <code>invalid name r(198)</code> error. </p>
  
  <p>For example, when I first start up Stata, I enter the following code into the command prompt:</p>
  
  <pre><code>local hello 123
  di 'hello'
  </code></pre>
  
  <p>This results in:</p>
  
  <pre><code>'hello' invalid name    
  r(198);
  </code></pre>
  
  <p>Similarly, I try:</p>
  
  <pre><code>forvalues i=1/5 {
      display 'i'
  }
  </code></pre>
  
  <p>Which results in the same <code>invalid name</code> error. </p>
  
  <p>I'm obviously doing something fundamentally wrong. I have tried putting the same commands into a <code>do</code> file and running them, but the same thing occurred. </p>
  
  <p>I was wondering if it's something to do with how I'm running the code <a href="http://www.stata.com/statalist/archive/2013-02/msg00897.html" rel="nofollow noreferrer">as this link alludes to</a>, but nothing suggested there worked for me. </p>
  
  <p>I'm running Stata remotely from a server, if that could affect anything.</p>