TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Monospaced Font
Show HTML Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
X-To: Rick Duley <[log in to unmask]>
Date: Wed, 5 Sep 2001 08:24:20 +0200
Reply-To: Jacob Sparre Andersen <[log in to unmask]>
From: Jacob Sparre Andersen <[log in to unmask]>
In-Reply-To: <[log in to unmask]>
Content-Type: TEXT/PLAIN; charset=US-ASCII
MIME-Version: 1.0
Parts/Attachments: TEXT/PLAIN (37 lines)
[ Rick seems to have forgotten Team Ada <[log in to unmask]>
  in his reply. I have re-inserted it here. ]


> Pesudorandom generation produces the same list of
> randomly distributed units every time it is elaborated
> with a fixed seed.

Yes. Therefore you reset the generator with a time-dependent
Reset procedure [RM A.5.2(34)] _once_ during the
"initialisation" of your program.

>  This is no use for words games because you get the same
> series of playing selections each time.  The generator
> updates a seed variable regularly in the background

I am quite sure that standard compliant Ada random number
generators _only_ updates the seed when either a Random or a
Reset routine is called.

> and the character generator reseeds with this seed each
> time it is called.  In this was the selection is truly
> randomised by the human interaction in the time between
> calls.

I think you should read section A.5.2 in the Ada reference
manual (as well as section G.2.5 if your compiler supports

"I am an old man now, and when I die and go to Heaven there are two matters
 on which I hope enlightenment. One is quantum electro-dynamics and the
 other is turbulence of fluids. About the former, I am rather optimistic."
 Sir Horace Lamb.