PostScript command to generate a pseudorandom integer and place it on the top of the stack.

The following example generates a pseudorandom number between 0 and 5, not necessarily uniformly distributed, and leaves it on the top of the stack:

rand 6 mod