delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/11/17/10:45:02

X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs
Date: Tue, 17 Nov 1998 16:44:16 +0100 (MET)
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
X-Sender: broeker AT acp3bf
To: djgpp-workers AT delorie DOT com
Subject: Re: rand
In-Reply-To: <199811171504.KAA29099@indy.delorie.com>
Message-ID: <Pine.LNX.3.93.981117164114.7061S-100000@acp3bf>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

On Tue, 17 Nov 1998, DJ Delorie wrote:

> 
> If ANSI doesn't specify the actual sequence of numbers, can we just
> keep returning zero from rand() until srand() is called?

No, at least not unless we're willing to return a constant zero from
rand() again, whenever the user called srand(1) himself. 

I strongly suggest to return to the current behaviour. It may confuse
newbies, but there's no way around that allowed by the standard.

Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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