next up previous

12.5.1.8 Absolute Value

The abs function returns the absolute value of its only argument (which should be a numeric expression). The return value will either be integer or float (depending upon the type the argument).

Syntax

(abs <numeric-expression>)

Example

CLIPS> (abs 4.0)
4.0
CLIPS> (abs -2)
2
CLIPS>


next up previous