Mail Archives: djgpp/1998/01/22/11:39:58
On Thu, 22 Jan 1998, Mirek Prywata wrote:
> 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.
This is only correct for Borland. In DJGPP and many Unix compilers,
`random' is a function, not a macro, and it uses an entirely different
algorithm. Please make a point to double-check yourself before posting
such definitive replies.
> One more thing random() is niether better nor worse than rand() /random
> as a macro using rand/
Wrong again. `random' uses a different algorithm that makes low-order
bits much more random than what `rand' returns. For example, random()%3
will yield much more random 2-bit number than rand()%3.
- Raw text -