This version is out of date, covering development from v9.5.0 to v9.7.3. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

abs(sourceNum)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Last Altered: 

 Function  [other Function type actions]

 Item  [operators of similar scope]

 Mathematical  [other Mathematical operators]

 Baseline

 As at baseline


abs(sourceNum)

abs() computes the absolute value of its sourceNum argument. This is the non-negative value of sourceNum without regard to its sign. Thus both these result in a $MyNumber value of 3.5:

$MyNumber = abs(3.5); 

$MyNumber = abs(-3.5); 

The operator can also evaluate a numerical attribute:

$MyNumber = abs($SomeNumber); 

A numerical string attribute will be parsed to a number. If $MyString is a value of "-5", $MyNumber will be 5:

$MyNumber = abs($MyString);