title: Forward function declarations in a Bash or a Shell script?
body: <p>Is there such a thing in <code>bash</code> or at least something similar (work-around) like forward declarations, well known in C / C++, for instance?</p>
  
  <p>Or there is so such thing because for example it is always executed in one pass (line after line)?</p>
  
  <p>If there are no forward declarations, what should I do to make my script easier to read. It is rather long and these function definitions at the beginning, mixed with global variables, make my script look ugly and hard to read / understand)? I am asking to learn some well-known / best practices for such cases.</p>
  
  <hr>
  
  <p>For example:</p>
  
  <pre><code># something like forward declaration
  function func
  
  # execution of the function
  func
  
  # definition of func
  function func
  {
      echo 123
  }
  </code></pre>