From owner-freebsd-hackers Mon Oct 7 13:19:52 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA25296 for hackers-outgoing; Mon, 7 Oct 1996 13:19:52 -0700 (PDT) Received: from agora.rdrop.com (root@agora.rdrop.com [199.2.210.241]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id NAA25272 for ; Mon, 7 Oct 1996 13:19:48 -0700 (PDT) Received: from irz301.inf.tu-dresden.de by agora.rdrop.com with smtp (Smail3.1.29.1 #17) id m0vAM8C-00092xC; Mon, 7 Oct 96 13:18 PDT Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id VAA06721 for ; Mon, 7 Oct 1996 21:22:09 +0200 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id VAA14553 for freebsd-hackers@freebsd.org; Mon, 7 Oct 1996 21:22:08 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id VAA15800 for freebsd-hackers@freebsd.org; Mon, 7 Oct 1996 21:21:04 +0200 (MET DST) From: J Wunsch Message-Id: <199610071921.VAA15800@uriah.heep.sax.de> Subject: Re: rand() and srand() To: freebsd-hackers@freebsd.org (FreeBSD hackers) Date: Mon, 7 Oct 1996 21:21:04 +0200 (MET DST) In-Reply-To: <199610071857.MAA08190@rover.village.org> from Warner Losh at "Oct 7, 96 12:57:02 pm" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk As Warner Losh wrote: > This tells me that if I give the same seed to srand() three times in a > row, I will get the same pseudo random sequence out of it. > > If you are proposing that this change, then you are breaking existing > code's assumptions. After all, it is documented to do this. This is also what ANSI requires. (And it requires that the default is the same as can be achieved by ``srand(1)''.) Nothing else is required though. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)