title: Julia: Index an array with Int64?
body: <p>The following code complains </p>
  
  <pre><code>ERROR: `setindex!` has no method matching setindex!(::Type{Array{Int32,32}}, ::Int32, ::Int64)
  </code></pre>
  
  <p>Should I be able to do this? The problem, I think, is that the loop variable has the wrong type to be used as an array index?</p>
  
  <pre><code>n = parseint(readline(STDIN))
  A = Array{Int32, n}
  for i in 1:n-1
      ai = parseint(Int32, readuntil(STDIN, ' '))
      A[i] = ai #The error happens here!
  end
  A[n] = parseint(Int32, readline(STDIN))
  </code></pre>