From: Mirek Prywata Newsgroups: comp.os.msdos.djgpp Subject: Re: random numbers? Date: Thu, 22 Jan 1998 15:36:49 +0100 Organization: ift Lines: 30 Message-ID: <34C75981.7A16524A@fuw.edu.pl> References: <34C623E7 DOT 4BBD AT utc DOT fr> NNTP-Posting-Host: solth2.fuw.edu.pl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Van Mo Dang wrote: > > Eli Zaretskii wrote: > > > > 2 - Which file should be included to know their prototypes ? > > > > None. Just declare the prototype yourself. > > Thank you for your fast answer and the information. > Isn't it kind of unusual that the prototypes of these functions > are not declared in any constant header file? You do not understand or you pretend you don't understand. random() and randomize(), etc are only MACROS, which does not belong to ANSI C. They are popular IMHO because of Borland C (maybe some other compiler have them as well). If you want to know sth more about random number generators, just read the chapter from Numerical Recipes (it's available on the net as postscript). There are examples or better and worse random number generator. After reading it, you can take a look at the source of rand.c in DJGPP. Or you can easily compile your own random number generator. One more thing random() is niether better nor worse than rand() /random as a macro using rand/ You will never get random() numbers from computer, you can have only pseudo-random numbers. Mirek