Random Function

Description:

This function returns a random integer or float value.

Format:

integer_result = RANDOM(min_integer_expression, max_integer_expression)
float_result = RANDOM(min_float_expression, max_float_expression)

Parameter:

min_integer_expression

An integer expression defining the minimum value that can be returned.

max_integer_expression

An integer expression defining the maximum value that can be returned.

min_float_expression

A float expression defining the minimum value that can be returned.

max_float_expression

A float expression defining the maximum value that can be returned.

Example:

INTEGER i;

// Generate a random value between 1 and 100
i = Random(1, 100);
// Generate a random value between 5 and 13
i = Random(5, 13);

FLOAT f;

// Generate a random value between 1.23 and 123.45
f = Random(1.23, 123.45);





Go back to the Learning center:


Copyright © AgileLoad. All rights reserved.
Agile Load testing tool| Contact AgileLoad | Terms of Use | Sitemap