From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) Newsgroups: comp.os.msdos.djgpp Subject: Re: How to limit a random() with DJGPP ? Date: 7 Feb 1998 06:14:11 GMT Organization: The National Capital FreeNet Lines: 12 Message-ID: <6bgu3j$ra9@freenet-news.carleton.ca> References: <6bdeu3$evr$1 AT news4 DOT isdnet DOT net> <19980206025400 DOT VAA01280 AT ladder03 DOT news DOT aol DOT com> Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) NNTP-Posting-Host: freenet5.carleton.ca To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Your best bet, actually, would be to use (random()>>4)%10, for instance, to discard the low four bits, which are usually less random than the rest of the pseudo-random number and which make this known when %ing by small quantities. -- .*. Friendship, companionship, love, and having fun are the reasons for -() < life. All else; sex, money, fame, etc.; are just to get/express these. `*' Send any and all mail with attachments to the hotmail address please. Paul Derbyshire ao950 AT freenet DOT carleton DOT ca pgd73 AT hotmail DOT com