From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) Newsgroups: comp.os.msdos.djgpp Subject: Re: drand48, srand48?? Date: 28 Aug 1997 09:07:48 GMT Organization: The National Capital FreeNet Lines: 20 Message-ID: <5u3f54$cuf@freenet-news.carleton.ca> References: <3404708E DOT 4A01 AT nortel DOT com> Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) NNTP-Posting-Host: freenet6.carleton.ca To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Shane Crowe (shanec AT nortel DOT com) writes: > Our GNU C compiler setup for Unix has support for drand48 and > srand48 functions. The 48 is for 48-bit math. Does this exist > for djgpp? If so, where? This would make porting stuff over to > DOS easier. I don't think so. But djgpp has long long, a 64 bit type. Try this: long long foo; srand(time(NULL)); foo=(rand()<<16)+rand(); Will that do the job? -- .*. Where feelings are concerned, answers are rarely simple [GeneDeWeese] -() < When I go to the theater, I always go straight to the "bag and mix" `*' bulk candy section...because variety is the spice of life... [me] Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh