InitRnd statement

Initializes the random number generator, for use with the Rnd function.

InitRnd expression

The InitRnd statement has the following parameter.

ParameterDescription
expressionAny legal expression. expression is used as a string, and sets a starting value for the next invocation of Rnd.




Because the Rnd function works with a specific algorithm, if you seed it with a particular value, then Rnd will generate the same series of random numbers, with each iteration. To ensure that Rnd generates a unique series of random numbers each time, seed it with a unique value (as, for example, that from the TimeDate() function).|

/* The present time and date set the random number generator with a unique value. */

InitRnd Time(): Date()
  • guides/programming/programmers_reference_manual/initrnd.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1