Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!psuvax1!psuvm!cxt105 From: CXT105@psuvm.psu.edu (Christopher Tate) Newsgroups: comp.sys.mac.programmer Subject: Random() from with AfterDark (was Re: System Error 389) Message-ID: <91050.080755CXT105@psuvm.psu.edu> Date: 19 Feb 91 13:07:55 GMT References: <1991Feb18.221718.9087@portia.Stanford.EDU> Organization: Penn State University Lines: 22 In article <1991Feb18.221718.9087@portia.Stanford.EDU>, ralphm@portia.Stanford.EDU (Ralph Melton) inquires: >One last question: Is it inappropriate for me to call Random from within >an After Dark module? I realize that, since I don't have globals, if I >call Random, I am stepping on the RandSeed global of someone else's >A5 world. But RandSeed is supposed to contain a pseudorandom number. >If I replace it with a different pseudorandom number, will I give any >program problems? You might want to put in your own random number seed, and then replace the original contents of randSeed after calling Random(). If you just trash the randSeed, it's certainly conceivable that you will interfere with someone who's running statistical simulations of some sort, and is relying on having a predictable sequence of numbers generated by Random(). ------- Christopher Tate | | Are they purple, and eat people, Uucp: {...}!psuvax1!psuvm.bitnet!cxt105 | or do they just eat purple people? Internet: cxt105@psuvm.psu.edu |