[ Arithmetic | Reference Manual | Alphabetic Index ]

random(-N)

Generates a random integer N
N
Integer or Variable.

Description

This predicate/function is deprecated, use random/2 instead.

random/1 unifies N with a random integer between 0 and at least 2^30-1.

Modes and Determinism

Examples

Success:
      ?- random(X).
      X = 937289391
      Yes (0.00s cpu)

      ?- Y is random.
      Y = 710717965
      Yes (0.00s cpu)

See Also

random / 2, frandom / 1, seed / 1