TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Rick Duley <[log in to unmask]>
Reply To:
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

(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

             accept Stop;
             exit Running_Loop;
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.


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