mod
Summary
Returns the modulo of two parameters.Usage
input|mod( value1 [,value2] )
Parameters
Name | Type | Description | Required |
---|---|---|---|
value1 | number | Divisor or dividend. | Yes. |
value2 | number | Divisor or dividend. | Only if the input parameter is omitted. |
Returns
Integer (the modulo of the supplied parameters).Description
This operator returns the modulo (rest after division) of the first parameter divided by the second. The operator can also take an input parameter. If the input parameter is used, then it will be divided by the first parameter (and thus the second parameter will be ignored).
Examples
Example 1
{5|mod( 3 )}
or
{mod( 5, 3 )}
The following output will be produced: "2".
Example 2
{6|mod( 3, 7 )}
The following output will be produced: "0".
Balazs Halasy (05/02/2004 10:47 am)
Balazs Halasy (04/05/2005 2:18 pm)
Comments
There are no comments.