title: bash - How to declare a local integer?
body: <p>In Bash, how do I declare a local integer variable, i.e. something like:</p>
  
  <pre><code>func() {
    local ((number = 0)) # I know this does not work
    local declare -i number=0 # this doesn't work either
  
    # other statements, possibly modifying number
  }
  </code></pre>
  
  <p>Somewhere I saw <code>local -i number=0</code> being used, but this doesn't look very portable.</p>