9.3.118 RANDOM_SEED ([SIZE] [,PUT] [,GET])

Description:  Restarts or queries the seed (starting point) for the pseudorandom number generator used by RANDOM_ NUMBER.  
Class:  Subroutine 
Arguments:  There must be only one or no arguments present. The three optional arguments follow[1]: 
  SIZE (opt) Must be scalar and of type default integer. It is set to the number of integers (N) that the processor uses to hold the value of the seed.  
  PUT (opt) Must be a default integer array of rank one and size >= N. It is used to set the seed value.  
  GET (opt) Must be a default integer array of rank one and size >= N. It is set to the current value of the seed. 

[1] SIZE and GET are INTENT(OUT) arguments; PUT is an INTENT(IN) argument. For more information on INTENT, see Section 5.10.

Examples

Consider the following:

CALL RANDOM_SEED                       ! Processor initialization
CALL RANDOM_SEED (SIZE = M)            ! Sets M to N
CALL RANDOM_SEED (PUT = SEED (1 : M))  ! Sets user seed
CALL RANDOM_SEED (GET = OLD  (1 : M))  ! Reads current seed


Previous Page Next Page Table of Contents