Tuesday, 8 January 2013

Microsoft Dynamics AX 2012 R2 - abs Function

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.

Function

  • real abs(real arg)

Parameters

  • Parameter: arg
  • Description: The number to get the absolute value of.

Return Value

  • The absolute value of arg.

Example

  • X++
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;
    }
}

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - abs Function' was informative. Please feel free to leave your comments.

No comments:

Post a Comment