title: How to use dimension x(n) in main program in Fortran?
body: <p>I want to make <code>x(1),x(2),x(3),...,x(n)</code> using dimension in Fortran.</p>
  <p>Example :</p>
  <pre><code>n=10 
  dimension x(n) 
  do n=1,10
  print*,x(n)
  enddo
  stop
  end
  </code></pre>
  <p>But it's not allowed as far as I know...<br />
  And I get this error:</p>
  <blockquote>
  <p>symbol N is not permitted in a specification expression Errors in declarations, no further processing for main</p>
  </blockquote>
  <p>How can I make <code>x(1),x(2),x(3),...,x(n)</code>?</p>