Path: utzoo!utdoe!generic!pnet91!ericmcg From: ericmcg@pnet91.cts.com (Eric Mcgillicuddy) Newsgroups: comp.sys.apple2 Subject: Re: Random number generation with Hyper C Message-ID: <482@generic.UUCP> Date: 9 Feb 91 15:22:00 GMT Sender: root@generic.UUCP Organization: People-Net [pnet91], Etobicoke, ON Lines: 19 Try this: INT rando() { LOCAL INT seed = 1; seed = seed * 65533 + 32767; return (seed); } I got this from the HyperC people circa 1985 in response to the identical query that you are making now. It is called "mixed congruential method" or so they say. It returns a signed integer as the result. It will apparently generate every number once before repeating any. I have not tried it myself, but feel free. Personally, I don't see how it could work, unless it exploits a bug in the compiler. UUCP: bkj386!pnet91!ericmcg INET: ericmcg@pnet91.cts.com