TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Proportional Font
Show Text 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]>
Date: Tue, 4 Sep 2001 11:25:12 -0400
Reply-To: Michael Feldman <[log in to unmask]>
From: Michael Feldman <[log in to unmask]>
Content-Transfer-Encoding: 7bit
In-Reply-To: <no.id> from "Jacob Sparre Andersen" at Sep 04, 2001 12:38:06 PM
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Parts/Attachments: text/plain (26 lines)
Rick et al,
>
> Rick:
>
> > I am working on a class assignment project for which I
> > require a stream of random characters.  To circumvent
> > the problem of identical lists from Ada.Discrete_Random
> > I devised a task which continually updates seed numbers.
>
> I honestly can't see why you should update the seeds
> "manually". If you just use a single generator and
> encapsulates it in a protected type, you should get as good
> random numbers as you can expect from a deterministic
> system.
>
> Jacob

It's unclear what you mean by "identical lists" here. If you
call Reset on your generator variable before producing the sequence,
the generator will seed off the real-time clock, so the chance
of two identical sequences is nonzero but pretty small.

Did I miss something here?

Mike Feldman

ATOM RSS1 RSS2