Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

setstate(3) Guardian Native C Library Calls Reference Manual
NAME
setstate - Switches hte state array used by the random number generator
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZSTFNSRL
G-series native OSS processes: /G/system/sysnn/zstfnsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
H-series OSS processes: /G/system/zdllnnn/zcredll
SYNOPSIS
#include <stdlib.h>
char *setstate (
const char *state
PARAMETERS
state Is a pointer to a state array.
DESCRIPTION
Switches the state array used for random number generation.
After you have initialized a state array with the initstate( ) function, you can use the setstate()
function to switch state arrays. Subsequent calls to the random( ) function will use the state
array pointed to by the state parameter until either initstate() is called or setstate() is called
again.
NOTES
This function can be called by native processes only.
RETURN VALUES
The setstate( ) function returns a pointer to the previous state array.
ERRORS
None. This function does not set errno.
RELATED INFORMAITON
Functions: initstate(3), random(3), srandom(3).
STANDARDS CONFORMANCE
The setstate( ) function is dened in the XPG4 Version 2 specication.
624 Hewlett-Packard Company 527192-007