cvs.gedasymbols.org/archives/browse.cgi | search |
From: | "DeHackEd" <Not DOT given AT out> |
References: | <19980315154000 DOT KAA08561 AT ladder03 DOT news DOT aol DOT com> |
Subject: | Re: Easy question... |
Date: | Sun, 15 Mar 1998 20:21:44 -0500 |
Lines: | 13 |
Message-ID: | <#zHZsoHU9GA.191@upnetnews02.moswest.msn.net> |
Newsgroups: | comp.os.msdos.djgpp |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
rand() and random() take no arguements. They return numbers from 0 to RAND_MAX or INT_MAX (not sure which). If you want to limit what they return, use a mod (rand()%10)command. If you want either 0 or 1, use random()&0x400 for safety, as random generators are not as random as one would hope. -- "DeHackEd" EMail address not given out due to low-life spammers. Where's the asm command dwim (do what I mean) when you need it?
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |