abs Function [AX 2012]

Updated: September 24, 2009

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Retrieves the absolute value of a real number.

For example:

  • abs(-100.0) returns the value 100.0.

  • abs(30.56) returns the value 30.56.


real abs(real arg)

Parameter

Description

arg

The number to get the absolute value of.

The absolute value of arg.

static void absExample(Args _args)
{
    real r1;
    real r2;
    ;

    r1 = abs(-3.14);
    r2 = abs(3.14);
    if (r1 == r2)
    {
        print "abs of values are the same";
        pause;
    }
}

Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).

Community Additions

ADD
Show: