::: Area #157 (comp.sys.acorn.programmer)Message: #28002 (Read 4 times, has 0 replies, 944 bytes)Date   : Tue Jan 27 10:39:25 1998From   : Laurence Tratt of fidonet#2:254/27.2To     : AllSubject: Re: RNDMessage-ID: <34CDB95D.4B18CF70@dcs.kcl.ac.uk>Priv-Reply-To: tratt@dcs.kcl.ac.ukOrganization: King's College, LondonTony Hopstaken wrote:> I'm looking for a BASIC routine that generates *reeal* random numbers.This is a pretty vague question; in one sense, it is impossible for acomputer to generate *real* (or presumably reeal :)) random numbers. They'reall generated by formulae. However, in BASIC, what you want to do is seedthe algorithm:  SYS "OS_ReadMonotonicTime" TO t  temp = RND(-t)which you should find gives you a different set of random numbers every timeyou run your program. This is a better method than RND(-TIME), becauseOS_ReadMonotonicTime counts the time since you pressed the on button yourmachine, whereas TIME is the time since your last reset.               ^^^^^^ - NOOOOO TIME gets set at RESET to the cs since 1900Laurie--- EchoMaker 0.46 * Origin: The Arcade BBS Usenet News Gateway (2:254/27.2)