delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/09/01:49:44

From: "Stefan Viljoen" <rylan AT intekom DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Random numbers?
Date: Thu, 9 Dec 1999 07:06:27 +0200
Organization: The South African Internet Exchange
Lines: 19
Message-ID: <82ndpi$sll$4@ctb-nnrp1.saix.net>
References: <384F1689 DOT B435CCDF AT localnet DOT com>
NNTP-Posting-Host: pc36-01-p54.nt.saix.net
X-Trace: ctb-nnrp1.saix.net 944716402 29365 155.239.194.54 (9 Dec 1999 05:13:22 GMT)
X-Complaints-To: abuse AT saix DOT net
NNTP-Posting-Date: 9 Dec 1999 05:13:22 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Mark Simmons <zack97 AT localnet DOT com> wrote in message
news:384F1689 DOT B435CCDF AT localnet DOT com...
> How do I get a number that will be psuedo random?  time(null) % max
> doesn't work because the numbers need to be read in quick succession and
> it simply produces a 1,2,3,4,5,6,7,8,9...0,1,2.... etc. pattern.. So,
> how do I get a number that seems sort of random with a variable max?

How about using a faster running timer to seed the generator...?


--
This message courtesy of
RylanNet rylan AT intekom DOT co DOT za
http://home.intekom.com/rylan/
--
StarWars for ever!.


- Raw text -


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