UTIL_Rand
Full Description
swirl
Syntax
  define external counter function UTIL_Rand


Purpose

This function returns a pseudo-random number between 0 and 32767 (2^15 - 1). Like the ANSI C rand() function, UTIL_Rand has a period of 2^32.

Example:

  ; in this example, the time is used as a seed to generate a random number

  process
     local counter seed initial {0}
     local counter RandomNumber initial {0}

     set seed to UTIL_GetTime
     UTIL_Srand(seed)   ; sets the seed

     set RandomNumber to UTIL_Rand

Copyright © OmniMark Technologies Corporation, 1988-1998.