RandomNumberGenerator.RandomNumber

Syntax:

RandomNumber(<BottomRange>, <UpperRange>)

Parameters:

<BottomRange> (optional)

Type: Number.
Bottom bound of range. Is specified by integer number and can't be less than 0.
Default value: 0.

<UpperRange> (optional)

Type: Number.
Upper bound of range. Is specified by integer and can't be greater than 4294967295 (2^32 - 1), also it can't be less then <BottomRange> parameter value.
Default value: 4294967295.

Returned value:

Type: Number.

Description:

Returns random integer in the specified range. The bottom bound of range can't be less than 0, and the upper bound of range can be greater than 2^32 - 1.

Availability:

Thin client, server, thick client, external connection, Mobile application (client), Mobile application (server).

Example:

RNG = New RandomNumberGenerator(255);
RNG.RandomNumber(0, 10000);


    

1C:Enterprise Developer's Community