
random - creation of random numbers

Calling sequence:

random()
random(range)
random(integer)

Parameter:
range     --  integer range
integer   --  non-negative integer

Summary:

If random is called without arguments then a 12 digit non-negative number
is returned.

If the argument is a range then random returns a procedurewhose call returns
a random number from this range.

The call random(n) is a short form of random(0..n-1).

Because random returns procedures it is possible to use several random number
generators. However, all generators created with the same range return the
same series of random numbers.

The global variable SEED is used for changing the sequence of random numbers.
Any integer not equal to 0 can be assigned to SEED.

>>  SEED := 1: random();

      427419669081

>>  r1 := random(-5..5): r1();

      -1

>>  r2 := random(10): r2();

      7

