Rand DataWindow expression function
Description
Obtains a random whole number between 1 and a specified upper
limit.
Syntax
|
1 |
<span>Rand</span> ( <span>n</span> ) |
|
Argument |
Description |
|---|---|
|
n |
The upper limit of the range of random |
Return Values
A numeric datatype, the datatype of n.
Returns a random whole number between 1 and n.
Usage
The sequence of numbers generated by repeated calls to the Rand function
is a computer-generated pseudorandom sequence.
You can control whether the sequence is different each time
your application runs by calling the PowerScript Randomize function
to initialize the random number generator.
Examples
This expression returns a random whole number between
1 and 10:
|
1 |
<span>Rand</span>(10) |
See Also
-
Rand in the PowerScript
Reference -
Randomize in the PowerScript Reference
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest