Command: set_rand
  
Syntax: 
  set_rand(a1)
  
Description: 
  Set the random number generator to a certain state, a1, so that
  you will get a known series of random numbers on subsequent
  calls to rand(). The lower 32 bits of the value of a1 are
  used.
  
Comments: 
  Normally the numbers returned by the rand() function are totally
  unpredictable, and will be different each time you run your
  program. Sometimes however you may wish to repeat the same
  series of numbers, perhaps because you are trying to debug
  your program, or maybe you want the ability to generate the
  same output (e.g. a random picture) for your user upon request. 
  
Example: 
     sequence s, t
       s = repeat(0, 3)
       t = s
       
       set_rand(12345)
       s[1] = rand(10)
       s[2] = rand(100)
       s[3] = rand(1000)
       
       set_rand(12345)  -- same value for set_rand()
       t[1] = rand(10)  -- same arguments to rand() as before
       t[2] = rand(100)
       t[3] = rand(1000)
       -- at this point s and t will be identical
 
See Also: 
  rand
  
