www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/21/06:22:07

Date: Thu, 21 Nov 1996 13:12:08 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "John M. Aldrich" <fighteer AT cs DOT com>
Cc: Mad <mad AT grupo DOT bfe DOT pt>, djgpp AT delorie DOT com
Subject: Re: Problems with djgpp 2.01
In-Reply-To: <3293C0D8.3839@cs.com>
Message-Id: <Pine.SUN.3.91.961121131021.23836B-100000@is>
Mime-Version: 1.0

On Wed, 20 Nov 1996, John M. Aldrich wrote:

> You must seed the random number generator with a call to srand() before
> you use any random numbers in your program.  The output of time(0) is
> usually a good seed to use.

This is only necessary if you want a *different* random series each 
time.  Otherwise, no call to `srand' is required.

> Since this is going to the newsgroup, I have a comment for Eli/DJ:  It
> appears that, for some reason, srand() got left out of the libc.inf
> documentation!  Was this something deliberate, or just a mistake?

Omission.  I don't think somebody would deliberately omit docs of an ANSI 
function.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019