comp.lang.ada
 help / color / mirror / Atom feed
* Random numbers and ADA.
@ 1997-11-19  0:00 Ghost
  1997-11-20  0:00 ` Tom Moran
  1997-11-22  0:00 ` Matthew Heaney
  0 siblings, 2 replies; 3+ messages in thread
From: Ghost @ 1997-11-19  0:00 UTC (permalink / raw)



Hi,
	I'm new to ADA, but I've programmed in a few other languages.  I was
wondering if ADA has a predefined RANDOM function.  I know Pascal has
one, and I think C does(never had to use it, oddly enough), but I
haven't found anything about it in my rather limited ADA resources.
Does such a function exist, and if it does, which package is it in?




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

* Re: Random numbers and ADA.
  1997-11-19  0:00 Random numbers and ADA Ghost
@ 1997-11-20  0:00 ` Tom Moran
  1997-11-22  0:00 ` Matthew Heaney
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Moran @ 1997-11-20  0:00 UTC (permalink / raw)



 See  the Float or Discrete random generators in Ada.Numerics in your
Ada 95 reference or text.




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

* Re: Random numbers and ADA.
  1997-11-19  0:00 Random numbers and ADA Ghost
  1997-11-20  0:00 ` Tom Moran
@ 1997-11-22  0:00 ` Matthew Heaney
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew Heaney @ 1997-11-22  0:00 UTC (permalink / raw)



In article <34738DD6.633867D7@wvu.edu>, Ghost <awillia8@wvu.edu> wrote:

>Hi,
>        I'm new to ADA, but I've programmed in a few other languages.  I was
>wondering if ADA has a predefined RANDOM function.  I know Pascal has
>one, and I think C does(never had to use it, oddly enough), but I
>haven't found anything about it in my rather limited ADA resources.
>Does such a function exist, and if it does, which package is it in?

Yes, a random number function exists.

Ada.Numerics.Float_Random
Ada.Numerics.Discrete_Random

P.S. Ada isn't an acronym, so you don't need to spell it in all-caps.

--------------------------------------------------------------------
Matthew Heaney
Software Development Consultant
<mailto:matthew_heaney@acm.org>
(818) 985-1271




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

end of thread, other threads:[~1997-11-22  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-11-19  0:00 Random numbers and ADA Ghost
1997-11-20  0:00 ` Tom Moran
1997-11-22  0:00 ` Matthew Heaney

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