Seed32, Rnd32()

Returns a Random number between 0 and 4,294,967,295.

The Pseudo Random Number Generator is based on a Linear feedback shift register (LFSR). You must initialize the generator with Seed32 prior to your first call to Rnd(). A sporadic call to Seed32 increases the probability of a random number. There is a chance of returning a zero value when the LFSR jumps to the idle state. It is therefore recommended to vary the position and Seed starting values in your code until you get a constant and evenenly spread random value.

Syntax: Seed32 Expression
Syntax: result = Rnd32()


  ' Load the Random Generator with a arbitrary starting value
  Seed32 0x1a74f9d3
  ' permanently output random numbers
    print str(Rnd32())
    waitms 200