comp.lang.ada
 help / color / mirror / Atom feed
* Generating a random number, not sure why I'm getting this error
@ 2015-11-16  1:25 John Smith
  2015-11-16  2:29 ` Jeffrey R. Carter
  0 siblings, 1 reply; 4+ messages in thread
From: John Smith @ 2015-11-16  1:25 UTC (permalink / raw)


Hello,

I don't understand why this is failing to compile.  I don't understand the rationale for the failure above all else:

with Ada.Numerics.Discrete_Random;
...
Ada.Numerics.Discrete_Random.Reset(Ada.Numerics.Discrete_Random.Generator);

And this is the error that I get:
:13:15: invalid prefix in selected component "Ada.Numerics.Discrete_Random" -- refers to the first Ada.Numerics.Discrete_Random...

The Ada documentation says that Discrete_Random has a Reset function, so why the error?
https://www2.adacore.com/gap-static/GNAT_Book/html/aarm/AA-A-5-2.html

I think I'm grossly misunderstanding how I'm calling Ada functions inside of packages.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-16  8:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-16  1:25 Generating a random number, not sure why I'm getting this error John Smith
2015-11-16  2:29 ` Jeffrey R. Carter
2015-11-16  2:53   ` John Smith
2015-11-16  8:51     ` Simon Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox