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

sub

Summary

Subtracts all remaining parameters from the first parameter.

Usage

input|sub( value [, ...] )

Parameters

NameTypeDescriptionRequired
value number A number that should be included in the subtraction. Yes.

Returns

Number (result of subtraction).

Description

This operator subtracts all remaining parameters from the first parameter and returns the result. If an input parameter is provided, all other parameters will subtracted from it.

Examples

Example 1

{10|sub( 2 )}

or

{sub( 10, 2 )}

The following output will be produced: "8".

Example 2

{sub( 10, 2, 3 )}

The following output will be produced: "5".

Example 3

{10|sub( 10, 2, 3 )}

The following output will be produced: "-5".

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

Balazs Halasy (04/05/2005 2:21 pm)


Comments

There are no comments.