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.

abs

Summary

Returns a positive value of either the input or the first parameter.

Usage

input|abs( value )

Parameters

NameTypeDescriptionRequired
value number Value to calculate absolute of. Only if the input parameter is omitted.

Returns

Absolute value of input or parameter.

Description

Returns a positive value of either the input or the "value" parameter. If both are provided, it is the "value" parameter that will be used.

Examples

Example 1

{-16|abs}

or

{abs( -16 )}

The following output will be produced: "16".

Example 2

{abs( 256 )}

The following output will be produced: "256".

Example 3

{-64|abs( -128 )}

The following output will be produced: "128".

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

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


Comments

There are no comments.