Mail Archives: djgpp/1997/08/17/03:45:36
John M. Aldrich wrote:
> srand( (int) time( NULL ) ); /* seeds rand() */
If you're going to use an explicit cast, might as well use the right one
(because otherwise this could conceivably generate a signed/unsigned
conversion warning). srand's sole argument is of type unsigned int. (Why
exactly this is the case is not clear to me.)
Minor ANSI C nitpick from the minor ANSI C advocate . . .
--
Erik Max Francis, &tSftDotIotE / email / mailto:max AT alcyone DOT com
Alcyone Systems / web / http://www.alcyone.com/max/
San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W
\
"Love is not love which alters / when it alteration finds."
/ William Shakespeare, _Sonnets_, 116
- Raw text -