contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
function   UTIL_Rand    
      Other Library Functions  

Library: System Utilities
Include: omutil.xin
Returns: Numeric

A pseudo-random number between 0 and 32767.

Declaration

  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

        Other Library Functions
   UTIL_ExpRand
   UTIL_GetEnv
   UTIL_GetMilliSecondTimer
   UTIL_GetProcessId
   UTIL_LibraryVersion
   UTIL_Rand
   UTIL_Sleep
   UTIL_Srand
   UTIL_UniformRand
 
----  

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:01:22 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.