title: Ada Function Parameter as Access Type or Not
body: <p>I am refactoring some code originally written using access types, but not yet tested. I found access types to be troublesome in Ada because they can only refer to dynamically allocated items, and referring to items defined at compile time is apparently not allowed. (This is Ada83.)</p>
  
  <p>But now I come to a function like this one:</p>
  
  <pre><code>function Get_Next(stateInfo : State_Info_Access_Type) return integer;
  </code></pre>
  
  <p>I know that I can easily pass parameter "contents" of an access type rather than the access pointer itself, so I am considering writing this as</p>
  
  <pre><code>function Get_Next(stateInfoPtr : State_Info_Type) return integer;
  </code></pre>
  
  <p>where State_Info_Type is the type that State_Info_Access_Type refers to.</p>
  
  <p>With this refactor, for all intents and purposes I think I'm still really passing what amounts to an implicit pointer back to the contents (using the <em>.all</em>) syntax).</p>
  
  <p>I want to refactor and test starting with the lowest level functions, working my way up the call chains. My goal is to push the access types out of the code as I go. </p>
  
  <p>Am I understanding this correctly or am I missing something?</p>