On this page
8.233 SRAND — Reinitialize the random number generator
- Description:
SRANDreinitializes the pseudo-random number generator called byRANDandIRAND. The new seed used by the generator is specified by the required argument SEED.- Standard:
- GNU extension
- Class:
- Subroutine
- Syntax:
CALL SRAND(SEED)- Arguments:
-
SEED Shall be a scalar INTEGER(kind=4). - Return value:
- Does not return anything.
- Example:
-
See
RANDandIRANDfor examples. - Notes:
-
The Fortran 2003 standard specifies the intrinsic
RANDOM_SEEDto initialize the pseudo-random numbers generator andRANDOM_NUMBERto generate pseudo-random numbers. Please note that in GNU Fortran, these two sets of intrinsics (RAND,IRANDandSRANDon the one hand,RANDOM_NUMBERandRANDOM_SEEDon the other hand) access two independent pseudo-random number generators. - See also:
- RAND, RANDOM_SEED, RANDOM_NUMBER
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-4.9.3/gfortran/SRAND.html