title: expressions in forvalues in Stata
body: <p>I want to express the following using Stata code:</p>
  
  <pre><code>for(i=0;i&lt;n;++i) {
     for(j=i+1;j&lt;n-1;++j) {
        print i*j;
    }
  }
  </code></pre>
  
  <p>The outer <code>for</code> could be:</p>
  
  <pre><code>forvalues i = 0/`n' {
     //rest of the code
  }
  </code></pre>
  
  <p>But the inner <code>for</code> has expressions, and I do not know how to express that.</p>
  
  <p>PS: I think I know how to express the same using local variables or <code>while</code>, but I would like to avoid that.</p>