input|inc( value )
Name | Type | Description | Required |
---|---|---|---|
value | number | The value that should be incremented. | Only if the input parameter is omitted. |
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).
{255|inc}
or
{inc( 255 )}
The following output will be produced: "256".
{def $i=255} {set $i=inc( $i )} {$i}
The following output will be produced: "256".
Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.