#
Fortran Wiki

random_number

## Description

Returns a single pseudorandom number or an array of pseudorandom numbers from the uniform distribution over the range $0 \leq x \lt 1$.

## Standard

Fortran 95 and later

## Class

Subroutine

## Syntax

`random_number(harvest)`

## Arguments

`harvest`

- Shall be a scalar or an array of type `real`

.

## Example

```
program test_random_number
real :: r(5,5)
call random_number(r)
end program
```

## See also

random_seed

Revised on September 2, 2016 11:14:05
by

Jason Blevins
(128.146.137.52)
(540 characters / 0.0 pages)