LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

srand

srand

void srand (unsigned int seed);

Purpose

Uses the argument as a seed for a new sequence of pseudorandom numbers to be returned by subsequent calls to rand. If this function is called with the same seed value, the sequence of pseudorandom numbers shall be repeated.

Parameters

Input
Name Type Description
seed unsigned int Contains the seed used for the rand function to allow the generation of a new sequence of pseudorandom numbers. If the same seed value is used, the sequence of pseudorandom numbers generated by the rand function is repeated.

Return Value

None.

Additional Information

Library: ANSI C Library

Include file: ansi_c.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later

Examples

Refer to the following examples that use the srand function:

  • analysis\interp.cws

    Open example
  • userint\colview.cws

    Open example
  • userint\intgraph.cws

    Open example
Was this information helpful?