| Extracted from Pike v7.8 release 866 at 2018-07-18.

[Top]

# Method random()

Method random

  `mixed random(object o)`

Description

  If random is called with an object, lfun::random will be called in the object.

See also

  lfun::_random

Method random

  `int random(int max)`
  `float random(float max)`

Description

  This function returns a random number in the range 0 - max -1.

See also

  random_seed()

Method random

  `mixed random(array|multiset x)`

Description

  Returns a random element from x .

Method random

  `array random(mapping m)`

Description

  Returns a random index-value pair from the mapping.