home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / compat / stdlib / random.txh < prev    next >
Encoding:
Text File  |  1995-07-23  |  742 b   |  43 lines

  1. @node srandom, random number
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <stdlib.h>
  6.  
  7. int srandom(int seed);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function initialized the random number generator (@pxref{random}). 
  13. Passing the same @var{seed} results in @code{random} returning predictable
  14. sequences of numbers. 
  15.  
  16. @subheading Return Value
  17.  
  18. Zero.
  19.  
  20. @subheading Example
  21.  
  22. @example
  23. srandom(45);
  24. @end example
  25.  
  26. @c ----------------------------------------------------------------------
  27. @node random, random number
  28. @subheading Syntax
  29.  
  30. @example
  31. #include <stdlib.h>
  32.  
  33. long random(void);
  34. @end example
  35.  
  36. @subheading Description
  37.  
  38. Returns a random number in the range 0..MAXINT.
  39.  
  40. @subheading Return Value
  41.  
  42. 0 .. MAXINT
  43.