home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!spool.mu.edu!agate!stanford.edu!kronos.arc.nasa.gov!butch!netcomsv!netcomsv!terapin!rreed
- From: rreed@terapin.com (Rick Reed)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: AMOS1.34 BUGS
- References: <1jgfjkINN5aj@oak1.doc.ic.ac.uk>
- Message-ID: <rreed.3e52@terapin.com>
- Date: 22 Jan 93 05:08:29 PST
- Organization: BBS
- Lines: 60
-
- In article <1jgfjkINN5aj@oak1.doc.ic.ac.uk>, rpp@doc.ic.ac.uk (Raymond Paul
- Price) writes:
- >
- >Has any of you AMOS1.34 & Compiler 1.34 Users tried using the Randomize and/or
- >the enhanced Col command.
- >
- >Don't work ????
- >
- >Quite true
-
- Hmm... haven't tried the Col command lately...
-
- >
- >Try
- >
- >Randomize 2
- >?Rnd(100)
- >Randomize 2
- >?Rnd(100)
- >
- >Different values ????
-
- Hold on! You're seeding the random number generator with the SAME values! All
- the random number seed does is basically begin a constant chain of psuedo
- random numbers.
-
- If you did...
-
- Randomize 2
- ?Rnd(100),Rnd(100),Rnd(100)
- Randomize 2
- ?Rnd(100),Rnd(100),Rnd(100)
-
- You'd get the same sequence of three numbers on both lines! Why? Because you
- are resetting the pseudo random sequence back to its effectual beginning!!
-
- If, however, you do...
-
- Randomize 2
- ?Rnd(100),Rnd(100),Rnd(100)
- Randomize Timer
- ?Rnd(100),Rnd(100),Rnd(100)
-
- The two lines of numbers should be different (unless of course Timer equates to
- 2 at that moment!). Running it over and over again would produce the same
- numbers for the first line and different numbers for the 2nd! Why? 'Cause
- Timer, when used as a seed, generally (most likely) is different at every
- execution, thus giving you a new pseudo sequence. It's not broken at all!!!
-
- >
- >Yes there are bugs in these routin. Anyone want to know how to Fix them.
- >If there is enough feedback I'll post a little Proggy
- >
- >rpp@doc.ic.ac.uk
- >
-
- -Rick
-
- rreed@terapin.com
-
-