I'm trying to generate a random Positive in ada in my procedure. For this, I have the following 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;
I get the error
incorrect use of "random"
I have no idea, how is this an incorrect use, or what does it even mean. Could someone please elaborate? Thank you!