comp.lang.ada
 help / color / mirror / Atom feed
* 'Random' function in Ada
@ 1999-05-26  0:00 iang
  1999-05-26  0:00 ` Simon Pilgrim
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: iang @ 1999-05-26  0:00 UTC (permalink / raw)


Does anyone know of the existence of a freely available or easily
implementable Random function in Ada?


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---




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

* Re: 'Random' function in Ada
  1999-05-26  0:00 iang
  1999-05-26  0:00 ` Simon Pilgrim
  1999-05-26  0:00 ` Marin David Condic
@ 1999-05-26  0:00 ` John McCormick
  1999-05-28  0:00 ` Robert Dewar
  3 siblings, 0 replies; 6+ messages in thread
From: John McCormick @ 1999-05-26  0:00 UTC (permalink / raw)


See A.5.2 of the Ada 95 Reference Manual (Random Number Generation) for
packages with functions that generate random float values and discrete
values.

John

In article <7ih0s6$r08$1@nnrp1.deja.com>,
  iang@iplbath.com wrote:
> Does anyone know of the existence of a freely available or easily
> implementable Random function in Ada?
>
> --== Sent via Deja.com http://www.deja.com/ ==--
> ---Share what you know. Learn what you don't.---
>


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---




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

* Re: 'Random' function in Ada
  1999-05-26  0:00 iang
@ 1999-05-26  0:00 ` Simon Pilgrim
  1999-05-26  0:00 ` Marin David Condic
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Simon Pilgrim @ 1999-05-26  0:00 UTC (permalink / raw)


iang@iplbath.com wrote:
> 
> Does anyone know of the existence of a freely available or easily
> implementable Random function in Ada?

Check section A.5.2 of the LRM.

Regards,
Simon




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

* Re: 'Random' function in Ada
  1999-05-26  0:00 iang
  1999-05-26  0:00 ` Simon Pilgrim
@ 1999-05-26  0:00 ` Marin David Condic
  1999-05-26  0:00 ` John McCormick
  1999-05-28  0:00 ` Robert Dewar
  3 siblings, 0 replies; 6+ messages in thread
From: Marin David Condic @ 1999-05-26  0:00 UTC (permalink / raw)


iang@iplbath.com wrote:
> 
> Does anyone know of the existence of a freely available or easily
> implementable Random function in Ada?
> 
I'm not 100% sure what you mean by "Random function" but if what you
want is a random number generator, Ada comes fully equipped with what
you need. See ARM A.5.2 - Random Number Generation. If you don't have an
Ada Reference Manual, go to www.adahome.com where one is available
on-line.

If you had something else in mind, post something with more specific
requirements and maybe we can set you up with what you need.

Hope this helps.

MDC
-- 
Marin David Condic
Real Time & Embedded Systems, Propulsion Systems Analysis
United Technologies, Pratt & Whitney, Large Military Engines
M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600
***To reply, remove "bogon" from the domain name.***

Visit my web page at: http://www.flipag.net/mcondic




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

* Re: 'Random' function in Ada
@ 1999-05-27  0:00 Robert I. Eachus
  0 siblings, 0 replies; 6+ messages in thread
From: Robert I. Eachus @ 1999-05-27  0:00 UTC (permalink / raw)




iang@iplbath.com wrote:
> 
> Does anyone know of the existence of a freely available or easily
> implementable Random function in Ada?
 
    Yes.  Look in Ada.Numerics.Float_Random or
Ada.Numerics.Discrete_Random, or in the reference manual in A.5.2.  If
you are using Ada 83, or care a lot about algorithms used, send me
e-mail. 
-- 

                                        Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




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

* Re: 'Random' function in Ada
  1999-05-26  0:00 iang
                   ` (2 preceding siblings ...)
  1999-05-26  0:00 ` John McCormick
@ 1999-05-28  0:00 ` Robert Dewar
  3 siblings, 0 replies; 6+ messages in thread
From: Robert Dewar @ 1999-05-28  0:00 UTC (permalink / raw)


In article <7ih0s6$r08$1@nnrp1.deja.com>,
  iang@iplbath.com wrote:
> Does anyone know of the existence of a freely available or
> easily implementable Random function in Ada?

No doubt lots of people will point you to the specific section
in the RM, but more to the point is that you *really* need to
find out what is available standardly in Ada as part of learning
the language. Otherwise you will waste time reinventing the
wheel. You should also learn what special functions are provided
by your implementor (e.g. if you use GNAT, find out what is in
the GNAT.xxx hierarchy, and read the GNAT manuals).




Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




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

end of thread, other threads:[~1999-05-28  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-27  0:00 'Random' function in Ada Robert I. Eachus
  -- strict thread matches above, loose matches on Subject: below --
1999-05-26  0:00 iang
1999-05-26  0:00 ` Simon Pilgrim
1999-05-26  0:00 ` Marin David Condic
1999-05-26  0:00 ` John McCormick
1999-05-28  0:00 ` Robert Dewar

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