Modulo operator (%)

Description:

Divides the value of one expression by the value of another, and returns the remainder.

Format:

result = expression1 % expression2;

Parameters:

expression1

An integer or float expression.

expression2

An integer expression if expression1 is an integer expression, a float expression if expression1 is a float expression.

Example:

integer i;
float f;

f = 14. % 3.;
log "14 % 3 = " + ToString(f);
i = 18 % 3;
log "18 % 3 = " + ToString(i);

Output:

14 % 3 = 2
18 % 3 = 0





Go back to the Learning center:


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