next up previous 216
Next: PSX_REALLOC - Change the size of an allocated region of virtual memory
Up: Routine Descriptions
Previous: PSX_PUTENV - Set a new environment variable value


PSX_RAND - Generate a random number

Description:
Generate a random number. The number is generated as the integer INUM. The maximum value that this may have is returned as MAXNUM. Also the value of INUM divided by MAXNUM is returned as FNUM.

Invocation:
CALL PSX_RAND( INUM, MAXNUM, FNUM, STATUS )

Arguments:

INUM = INTEGER (Returned)
The random (integer) number.
MAXNUM = INTEGER (Returned)
The maximum value that INUM may have.
FNUM = REAL (Returned)
The value INUM/MAXNUM.
STATUS = INTEGER (Given)
The global status.

Notes:

References

Copyright
Copyright (C) 1991 Science & Engineering Research Council


next up previous 216
Next: PSX_REALLOC - Change the size of an allocated region of virtual memory
Up: Routine Descriptions
Previous: PSX_PUTENV - Set a new environment variable value

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