Share this page

# abs

Mathematics Functions

Gets the absolute value of an integer.

    int abs( int n);

n | An integer.

## Return Values

The absolute value of the integer.

For abs details, refer to your C language documentation.

## Example

The following example uses abs to convert the integers 23 and -11 to their absolute values:

Copy code

        int m = 23, n = -11;
        lr_output_message ("absolute value of %d = %d", m, abs(m));
        lr_output_message ("absolute value of %d = %d", n, abs(n));

    Example: Output:
    Action.c(5): absolute value of 23 = 23
    Action.c(6): absolute value of -11 = 11

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: