# 2.1.16.1.14 ran

## Description

This function is essentially the same as the rnd() function

## Syntax

double ran( int nSeed = 0 )

## Parameters

nSeed
[input] (optional) pass positive value, returns 0; pass any nonzero negative value to set the seed for random number generation, or 0 to use the default seed.

## Return

A uniformly random number between 0. and 1.

## Examples

EX1

// The example displays 10 random numbers between 0. and 1.
void    ran_ex1()
{
for (int ii = 0; ii < 10; ii++)
{
double    rr = ran();
out_double("value = ", rr);
}
}