delorie.com/archives/browse.cgi | search |
Date: | Sun, 1 Feb 1998 19:49:31 +0200 (IST) |
From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
To: | Myknees AT aol DOT com |
cc: | dj AT delorie DOT com, djgpp AT delorie DOT com |
Subject: | Re: Documentation [was Re: Random implementation] |
In-Reply-To: | <6f1d8ea6.34d15572@aol.com> |
Message-ID: | <Pine.SUN.3.91.980201194907.16390J-100000@is> |
MIME-Version: | 1.0 |
On Thu, 29 Jan 1998 Myknees AT aol DOT com wrote: > > This function must be seeded before first calling it, e.g. by using > > the function srand(). This is incorrect. `rand' will work okay with no seed at all (it has its default seed). You only need to call `srand' in two types of cases: - if you want the pseudo-random sequence to be different each time you run the program; - if you want to continue the sequence from the same place you ended it on some previous run.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |