title: Ada - Incorrect use of "random"
body: <p>I'm trying to generate a random Positive in ada in my procedure. For this, I have the following code:</p>
  
  <pre><code>  procedure Inicialize(K: Positive) is
       package rand is new ada.numerics.discrete_random(Positive);
       use rand;
       G: Generator;
       t: Positive;
    begin         
       isInitialized:= True;
       reset(G); 
       t := random(G); --error for this line
    end Inicialize;
  </code></pre>
  
  <p>I get the error </p>
  
  <pre><code>incorrect use of "random"
  </code></pre>
  
  <p>I have no idea, how is this an incorrect use, or what does it even mean. Could someone please elaborate?
  Thank you!</p>