Is there a UNIX SVR2 random/srandom equivalent?
Edward C. Bennett
edward at ukecc.UUCP
Thu Jul 11 23:21:00 AEST 1985
In article <2399 at sun.uucp>, guy at sun.uucp (Guy Harris) writes:
> > > Does anyone know what I should use in place of random and srandom?
> >
> > Lesson # 3. Using the manual:
>
> Using the System V manual isn't sufficient; you need the 4.2BSD manual to
> tell you what "random" does in the first place. The guy may not have a
> 4.2BSD manual, in which case telling him to "use the manual" doesn't help
> much.
>
In particular, while BSD and sysV RNGs both return ints, you
must pay attention to what an int is. On a local VAX 11/750 an int is 4
bytes. On our 3B20S an int is 2 bytes.
Usually this won't make any difference, but every now and then
you'll probably find a program where it does.
--
Edward C. Bennett
UUCP: ihnp4!cbosgd!ukma!ukecc!edward
/* A charter member of the Scooter bunch */
More information about the Comp.unix
mailing list