Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ initstate(3C) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                            initstate(3C)



        _________________________________________________________________
        initstate                                                function
        Initialize array for random number generation.
        _________________________________________________________________


        Calling Sequence

        char *initstate(), *state, *ptr;
        unsigned seed;
        int n;
        ...
        ptr = initstate(seed, state, n);


        Description

        The function initstate initializes a state array for future use;
        a state array contains information for random number generation.
        Initstate uses the size of the array, specified by n, to decide
        what type of random number generator to use; the larger n is, the
        better the random numbers will be.  The argument seed specifies
        the starting point for the random number sequence.


        Returns

        The function initstate returns a pointer to the previous state
        information array.


        Related Functions

        See also the functions random, setstate, and srandom.




















        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)



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