home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / hardware / 26890 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.5 KB  |  32 lines

  1. Newsgroups: comp.sys.mac.hardware
  2. Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!darwin.sura.net!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!ncar!csn!qwerty-gw.fsl.noaa.gov!yoda.fsl.noaa.gov!urban
  3. From: urban@yoda.fsl.noaa.gov (Art Urban)
  4. Subject: Re: SE/30 random number problem
  5. Message-ID: <1993Jan25.183640.17881@fsl.noaa.gov>
  6. Sender: urban@fsl.noaa.gov 
  7. Organization: Forecast Systems Lab, NOAA, Boulder CO, USA
  8. References: <1jtdklINN10t@aludra.usc.edu>
  9. Date: Mon, 25 Jan 1993 18:36:40 GMT
  10. Lines: 20
  11.  
  12. In article <1jtdklINN10t@aludra.usc.edu> silverma@aludra.usc.edu (David Silverman) writes:
  13. %I bought my se/30 soon after they came out and have had noticed a 
  14. %problem with random numbers. (Actually I noticed that while playing
  15. %games, things weren't as random as expected - I never had the 
  16. %problems on my plus with the same games.) So I wrote a pascal program
  17. %to simply make a list of random numbers and it looked fine. Turn the
  18. %machine of then on and you get the exact same list - is this what's
  19. %supposed to happen? 
  20. %David
  21.  
  22. In your own program you need to set the randSeed low memory global, or,
  23. yes, you will constantly get the same sequence. *If* you are using the mac
  24. toolbox, you can call GetDateTime ( &randSeed ) to vary the seed.
  25.  
  26.  
  27. -- 
  28. Art Urban                             urban@yoda.fsl.noaa.gov
  29. ===============================================================================
  30.  "Look, he's being attacked by creamy nugget centers."              -Joel
  31. ===============================================================================
  32.