How Can We Help?
< All Topics
Print

$modulus

Calculates one number modulo another.

Syntax

$modulus(expr1,expr2)

Parameters

expr1a number, or an expression that evaluates to a number
expr2a 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.

See Also

About Functional Expressions

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

pt_BRPortuguese