TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: David Muir
from: Sean Price
date: 1996-05-18 10:09:24
subject: Re: Random Seed

DM>     I (unfortunately) Don't know much about "C" in 
 DM> generaly (in Pascal we have 
 DM> the RANDOMIZE procedure). 

        Yeah.  Pascal's Randomize is usually done using the system timer.

 DM> But for a generally 
 DM> "different" number on each run, 
 DM> the one thing that comes to mind is the millisecond timer.
 DM> DosQuerySysInfo - QSV_MS_COUNT
 DM>     Seems to me that this would give you a "fairly" 
 DM> random seed (or at least a 
 DM> reason resistence to duplication.

        That's what I was looking for, but found something better.  Someone
else posted code for an ELF Hatch.  If you grab the system time or the  MS
timer you described, then run it through the ELF Hatch, you get a fairly
random seed.  Thanks  for your  help.

Sean


--- Maximus/2 3.01
* Origin: Sanctuary from The Law BBS (1:205/46)
SEEN-BY: 50/99 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1
@PATH: 205/46 500 1 270/101 712/515 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.