ibexa

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

inc

Summary

Increments either the input or the first parameter with one.

Usage

input|inc( value )

Parameters

NameTypeDescriptionRequired
value number The value that should be incremented. Only if the input parameter is omitted.

Returns

Number (input/parameter incremented with one).

Description

This operator increments either the input or the "value" parameter with one and returns the result as an integer. If both are provided, it is the "value" parameter that will be used. Please note that this operator can not be used directly to increment the value of a variable (please refer to the last example).

Examples

Example 1

{255|inc}

or

{inc( 255 )}

 

The following output will be produced: "256".

Example 2

{def $i=255}
{set $i=inc( $i )}
{$i}

The following output will be produced: "256".

Balazs Halasy (05/02/2004 10:46 am)

Svitlana Shatokhina (21/12/2006 10:35 am)

Balazs Halasy, Svitlana Shatokhina


Comments

There are no comments.