Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Rand – PB Docs 2021 – PowerBuilder Library

Rand – PB Docs 2021

Rand

DataWindow expression function

Description

Obtains a random whole number between 1 and a specified upper
limit.

Syntax

Argument

Description

n

The upper limit of the range of random numbers you
want returned. The lower limit is always 1. The upper limit cannot
exceed 32,767.

Return value

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:

See also

Rand in the section called “Rand” in PowerScript Reference

Randomize in the section called “Randomize” in PowerScript Reference


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x