Siebel VB Language Reference > Methods Reference for Siebel VB > Mathematical Methods >

Get Random Number Method


The Get Random Number method returns a single-precision, pseudo-random number between 0 and 1 depending on the following value that you specify in the number argument:

  • Less than zero. Uses the number you specify as the seed for a pseudo-random number. It creates this number every time the Get Random Number method runs.
  • Equal to zero. Uses the number most recently created.
  • Greater than zero or no value. Creates a sequence of pseudo-random numbers. Each run of the Get Random Number method uses the next number in the sequence. It creates the same sequence of random numbers when it runs unless the Randomize method resets the random number generator.

Because this method always uses the same algorithm and the same seed value to create a number, it creates a pseudo-random number rather than a true random number. The number it creates appears to be random unless it runs a very large number of iterations, at which point a pattern of numbers might emerge. For practical purposes, you can consider this pseudo-random number to fulfill the requirements you might have to create a random number.

Format

Rnd[(number)]

The following table describes the arguments that you can use with this method.

Argument
Description

number

A numeric expression that describes how to create the random number.

Example

For an example, see Randomize Method.

Siebel VB Language Reference Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.