How do I get random #s?

Henry Spencer henry at utzoo.uucp
Wed Feb 15 01:41:57 AEST 1989


In article <25745 at apple.Apple.COM> desnoyer at Apple.COM (Peter Desnoyers) writes:
>... C was evidently designed by people who didn't need random
>numbers - the standardized rand() doesn't allow a seed to be
>specified, making it useless when you need independent streams of
>random numbers.

Please read manual before flaming about it.  The V7 rand() allowed a
seed to be specified, as (I think) did earlier ones.  And so does
ANSI C (Oct draft) -- in fact the ANSI C spec for rand() is essentially
the V7 one.  If the C you use has broken this, complain to your supplier.
-- 
The Earth is our mother;       |     Henry Spencer at U of Toronto Zoology
our nine months are up.        | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list