setstate()

allows rapid switching between random number state arrays 

Function


SYNOPSIS

#include <stdlib.h>

char * setstate(char * arg_sate);


DESCRIPTION

The setstate() function allows rapid switching between random number state arrays. The state arrays must be initialized by the initstate() function. The array defined by the arg_state parameter is used for further random-number generation until the initstate() function is called or the setstate() function is called again. The setstate() function returns a pointer to the previous state array.


PARAMETERS

arg_state 

Points to an initialized state array.


RETURN VALUES

On success, setstate() returns a pointer to the previous state information array. Otherwise, it returns NULL.


CONFORMANCE

UNIX 98.


MULTITHREAD SAFETY LEVEL

Unsafe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
initstate(), random(), srandom()


PTC MKS Toolkit 10.4 Documentation Build 39.