Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ random(C) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rand(S)


 random(C)                       19 June 1992                       random(C)


 Name

    random - generate a random number

 Syntax

    random [ -s ] [ scale ]

 Description

    The random command generates a random number on the standard output. and
    returns the number as its exit value.  By default, this number is either
    0 or 1 (that is, scale is 1 by default).  If scale is given a value
    between 1 and 255, then the range of the random value is from 0 to scale.
    If scale is greater than 255, an error message is printed.

    When the -s, ``silent'' option is given, the random number is returned as
    an exit value but is not printed on the standard output.  If an error
    occurs, random returns an exit value of zero.

 See also

    rand(S)

 Notes

    This command does not perform any floating point computations.

    random uses the time of day as a seed.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026