#random()

DESCRIPTION
    returns a random fraction 0 <= r < 1

    or:

    returns a random integer from 1 to n
SYNOPSIS
    #random()

    or:

    #random(i)
ARGUMENTS
    none

    or:

    i - a positive integer, or positive integer expression
EXAMPLES
# pikt +C 'output $text(#random(),10)'
0.7098662308

# pikt +C 'output $text(#random(100))'
24
        begin
                pause #random(60)       // up to a 1-minute pause so we don't
                                        // hit the NIS servers all at once
        begin
                // so as not to clobber /usr/local from all machines at
                // once, put in this random pause
                pause #random(3600)     // up to a one-hour pause
SEE ALSO
    Numerical Functions
    String Functions
 
Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2019-01-12.   This site is PIKT® powered.
Copyright © 1998-2019 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
Learn about
config file
comments