srandom

Generates pseudorandom numbers.

Format

int srandom  (unsigned seed);

Arguments

seed
An initial seed value.

Description

This function is a random number generator that has virtually the same calling sequence and initialization properties as the rand and srand function, but produce sequences that are more random.

The srandom function initializes the current state with the initial seed value.

The srandom function, unlike the srand function, does not return the old seed because the amount of state information used is more than a single word.

See also rand, srand, and random in this section.

Return Values
Indicates success. Initializes the state seed. 
-1  Indicates an error, further specified in the global errno. 


Previous Page | Next Page | Table of Contents | Index