$modulus

Calculates one number modulo another.

Syntax

$modulus(expr1,expr2)

Parameters

expr1

a number, or an expression that evaluates to a number

expr2

a number, or an expression that evaluates to a number

Return Value

Number, with no decimal places.

Comments

Expr1 modulo expr2 is the remainder of the division of expr1 by expr2.

Before the operation is carried out, expr1 and expr2 are rounded, if necessary, to yield integer values.

Example

$modulus(5,2)

Evaluates to 1.

$modulus(5.2,2.43)

Evaluates to 1.

$modulus(Age,10)

Evaluates to 4 if Age is 54.

 

Related Topics