XL Fortran for AIX 8.1

Language Reference


RANDOM_NUMBER(HARVEST)

Returns one pseudo-random number or an array of pseudo-random numbers from the uniform distribution over the range 0 <= x < 1.

HARVEST
must be of type real. It is an INTENT(OUT) argument. It may be a scalar or array variable. It is set to pseudo-random numbers from the uniform distribution in the interval 0 <= x < 1.

Class

Subroutine

Examples

REAL X, Y (10, 10)
! Initialize X with a pseudo-random number
CALL RANDOM_NUMBER (HARVEST = X)
CALL RANDOM_NUMBER (Y)
! X and Y contain uniformly distributed random numbers


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]