TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Jacob Sparre Andersen <[log in to unmask]>
Reply To:
Jacob Sparre Andersen <[log in to unmask]>
Date:
Wed, 5 Sep 2001 08:24:20 +0200
Content-Type:
TEXT/PLAIN
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. ]

Rick:

> 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
it).

Jacob
--
"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.

ATOM RSS1 RSS2