|
|||||
function | UTIL_Rand |
Other Library Functions |
Library: System Utilities
Include: omutil.xin |
Returns: Numeric
A pseudo-random number between 0 and 32767. |
define external counter function UTIL_Rand
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 |
---- |