Xref: utzoo comp.sys.mac:55826 comp.sys.mac.programmer:15610 comp.sys.mac.misc:892 comp.sys.mac.system:666 Path: utzoo!attcan!uunet!mcsun!hp4nl!mhres!asacsg!kr From: kr@asacsg.mh.nl (Koos Remigius) Newsgroups: comp.sys.mac,comp.sys.mac.programmer,comp.sys.mac.misc,comp.sys.mac.system Subject: Random number Generator wanted. Keywords: Random number Message-ID: <152@asacsg.mh.nl> Date: 28 Jun 90 14:49:01 GMT Organization: Multihouse NV, the Netherlands Lines: 29 Hi there, I have a question about random numbes generators. I have found a random number that gives me a random integer. This function gives me a random integer ( between 0 and range ). ================================================================= function Randomize(range:Integer):Integer; var rawResult:LongInt; { "Raw" random number received from toolbox } begin { Randomize } rawResult:=(ABS(Random); { Get random number between 0 and 32767 } Randomize:=(rawResult * range) div 32768; { Scale to specified range } end; { Randomize } ================================================================= What I need is a random number generator that gives me a random LongInt back. The random number I want must lis between 0 and 2097151. I any of you out there has an idee how to do this, and willing to share your idee, than you can make me verry happy. I' am using Think Pascal for the Macintosh. Greetings from Holland, Koos Remigius. -- Koos Remigius kr@mh.nl via internet backbones Asac Nederland B.V uucp: ..!{uunet,hp4nl}!mh.nl!kr Coencoop 7, 2741 PG Waddinxveen, The Netherlands -------------------- "Still crazy after all this years" ---------------------