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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.