delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/18/20:20:50

Date: Thu, 18 Dec 1997 17:19:38 -0800 (PST)
Message-Id: <199712190119.RAA12104@adit.ap.net>
Mime-Version: 1.0
To: Mirek Prywata <nospam-mpry AT fuw DOT edu DOT pl>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: DJGPP and Randomize() ?

At 12:59  12/17/1997 +0100, Mirek Prywata wrote:
>Arbie wrote:
>> In other compilers I can use the randomize() function fine but I
>> always get an error if I use randomize() in a program Im doing via
>> DJGPP. Is it called or something else ? Which header file does it use
>> etc ?
>
>Look into stdlib.h in borland include dir. random() and randomize() are
>only makros, you can copy them to your source code, and use them. RTFM
>(in BC ) for more info. random() is not ANSI C function and it apperas
>only in BC (I may be wrong).
`rand' and the corresponding `srand' are ANSI. `random' and `srandom'
originated in BSD Unix, however I think most libraries contain them, for
compatibility if nothing else. DJGPP does have `random' and in fact it is a
better random number generator than `rand'. The legal issues of letting
`rand' have the better algorithm also are being looked at.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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