--- scheme-data.texi.~1.38.~ 1970-01-01 10:00:01.000000000 +1000 +++ scheme-data.texi 2003-11-11 10:21:08.000000000 +1000 @@ -1229,6 +1229,11 @@ @node Random @subsection Random Number Generation +Pseudo-random numbers are generated from a random state object, which +can be created with @code{seed->random-state}. The @var{state} +parameter to the various functions below is optional, it defaults to +the state object in the @code{*random-state*} variable. + @deffn {Scheme Procedure} copy-random-state [state] @deffnx {C Function} scm_copy_random_state (state) Return a copy of the random state @var{state}. @@ -1242,12 +1247,6 @@ number of the same type between zero (inclusive) and @var{n} (exclusive). The values returned have a uniform distribution. - -The optional argument @var{state} must be of the type produced -by @code{seed->random-state}. It defaults to the value of the -variable @code{*random-state*}. This object is used to maintain -the state of the pseudo-random-number generator and is altered -as a side effect of the random operation. @end deffn @deffn {Scheme Procedure} random:exp [state] @@ -1302,6 +1301,11 @@ Return a new random state using @var{seed}. @end deffn address@hidden *random-state* +The global random state used by the above functions when the address@hidden parameter is not given. address@hidden defvar + @node Characters @section Characters