next up previous 216
Next: PSX_TIME - Get the current calendar time
Up: Routine Descriptions
Previous: PSX_REALLOC - Change the size of an allocated region of virtual memory


PSX_SRAND - Set the seed for the random number generator

Description:
The argument SEED is used to set a new seed for the sequence of random numbers returned by the subroutine PSX_RAND. If PSX_SRAND is called with the same value of SEED, then the values returned by subsequent calls to PSX_RAND will be the same. If PSX_RAND is called before calling PSX_SRAND, then the sequence of random number returned by PSX_RAND will be the same as if PSX_SRAND had been called with SEED set to one.

Invocation:
CALL PSX_SRAND( SEED, STATUS )

Arguments:

SEED = INTEGER (Given)
The seed for the random number generator.
STATUS = INTEGER (Given and Returned)
The global status.

Notes:

References

Copyright
Copyright (C) 1991 Science & Engineering Research Council


next up previous 216
Next: PSX_TIME - Get the current calendar time
Up: Routine Descriptions
Previous: PSX_REALLOC - Change the size of an allocated region of virtual memory

PSX POSIX interface routines
Starlink User Note 121
P M Allan
A J Chipperfield
10 April 2003
E-mail:ussc@star.rl.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils