title: Ada equivalent of local static variable from C/C++
body: <p>I'm coming from C/C++ on embedded systems and all the time inside a function we use a static variable so that the value is retained throughout calls.</p>
  
  <p>In Ada, it seems like this is only done with the equivalent of file-level static variables. Is there an Ada equivalent.</p>
  
  <p>C++:</p>
  
  <pre><code>function Get_HW_Counter() {
     static int count = 0;
     return ++count;
  }
  </code></pre>
  
  <p>Ada:??</p>