Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!rpi!bu.edu!cvbnet!aperez From: aperez@cvbnet.UUCP (Arturo Perez x6739) Newsgroups: comp.sys.mac.hypercard Subject: Re: Initializing the random number generator Message-ID: <1185@cvbnetPrime.COM> Date: 2 Jan 91 23:16:48 GMT References: <3047@polari.UUCP> Sender: postnews@cvbnetPrime.COM Lines: 25 From article <3047@polari.UUCP>, by smelly@polari.UUCP (Tom Benedict): > > Regarding the random function in HyperCard. Are you sure your calling > random with the proper argument? I haven't had any problems getting > random number in my script or directly from the msg box. > random(5) generates a random number between 1 and 5 etc... > I didn't notice any problem under HC2.0 or 2.0v2. > Good luck > Tom Benedict Well, the problem is I always get the same sequence of random numbers Now, for testing purposes, you want to be able to ensure that you get the same sequence of numbers every time. But once a program is debugged then you have to set the sequence to something "random" every time it's started; like with the time, for example. So, how do I stop the random number generator from giving me that same sequence over and over again? Arturo Perez ComputerVision, a division of Prime aperez@cvbnet.prime.com Too much information, like a bullet through my brain -- The Police