TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

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

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

Print Reply
Rick Duley <[log in to unmask]>
Tue, 4 Sep 2001 23:46:17 -0400
text/plain (55 lines)
Hi again Teamers

The random generator problem is with the task, not Discrete_Random.  My task
just won't lie down and die without raising CONSTRAINT_ERROR.  Any idea why
not?

(The task is instantiated by assignment to an access type thus:

          Seeder := new Seed_Generator(Seed);

which works okay but the stop call raises CONSTRAINT_ERROR.  Stop process
is:

          ...
          or
             accept Stop;
             exit Running_Loop;
          or
          ...
which should, according to me, cause the normal completion of the task.  It
doesn't :(    )

As far as the generator goes, pseudorandom generators produce lists of
randomly distributed elements - the same list for each seed number.  This is
no use for word games because you get the same playing lists each time you
start the game - boring!  This project reseeds the character generator each
time it is called.  Its seeds are produced in the task and continuously
updated in the background.  Human interaction in the form of the time
between calls guarantees the randomicity of the selection provided.


Cheers
---------------------------------------------------------

Please: if you have not already done so, alter your addressbook settings for
me to
       [log in to unmask]
---------------------------------------------------------
Rick Duley
Perth, Western Australia
tel: +61 040 910 6049                            /-_|\
                                                /     \
                                          perth *_.-._/
“Never be a pioneer.                                 v
    It's the early Christian
        that gets the fattest Lion."
            Saki (H. H. Munro (1870 - 1916))





_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

ATOM RSS1 RSS2