Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

mod

Summary

Returns the modulo of two parameters.

Usage

input|mod( value1 [,value2] )

Parameters

NameTypeDescriptionRequired
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.