CAPL Script

Abs

This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.

Syntax

long abs(long x);
double abs(double x);

Function

Returns the absolute value.

Parameters

x — Value whose absolute value is to be returned.

Return Values

Absolute value of x.

long x;
x = abs(15);  // Result: 15