Date: Tue, 25 Feb 1997 10:16:44 +0200 (IST) From: Eli Zaretskii To: Erik Max Francis cc: djgpp AT delorie DOT com Subject: Re: Error?? In-Reply-To: <33127BBC.48E0ABC7@alcyone.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 24 Feb 1997, Erik Max Francis wrote: > random is a non-standard function. Thus you're not guaranteed that it will > have the same arguments on different compilers. AFAIK, `random' is POSIX. So at least POSIX-compliant compilers will have it. Borland, of course, isn't one of them. > Use rand (which is not as good a pseudorandom number generator in DJGPP), > like this: > > roll = rand()%6 + rand()%6 + rand()%6 + 3; A known problem with `rand' that using the lower bits of the value returned by it could get you very bad results. OTOH, `random' is specifically documented to have all of its bits random.