ph_random PowerHome formula function
Description
Generates random
numbers.
Syntax
ph_random ( max
)
Argument |
Description |
max
|
Long. The maximum random value
to return.
|
Return value
Long. Returns a random number which will be
between 1 and
max inclusive.
Usage
This function uses the random number
generator provided with the Microsoft cryptographic routines (vs the internal
random number generator used by the rand function). This function creates much
more random numbers than the rand function and should be used instead for truly
random number generation. This function also does NOT require the randomize()
function to be executed and will generate completely random numbers immediately.
Examples
The following examples demonstrate typical syntax/usage for this function.
ph_random(10)
The above example will
return a randomly generated number between 1 and 10
inclusive.