$modulus

$modulus

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< 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

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Deixe um comentário

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

pt_BRPortuguese