Monday 4 March 2013

Microsoft Dynamics AX 2012 R2 - cosh Function


Retrieves the hyperbolic cosine of a real number.

Argument values outside of the range –250 to 250 result in the following run-time error: "Argument for trigonometric function out of range."



Function

  • real cosh(real arg)

Parameters

  • Parameter: arg
  • Description: The hyperbolic number for which to calculate the cosine.

The value of the arg parameter must be in radians.


Return Value

  • The hyperbolic cosine of the specified number.

Example

  • X++
static void coshExample(Args _arg)
{
    real r;
    ;
    r = cosh(0.1);
    print "The hyperbolic cosine of 0.1 is " + num2Str(r, 2, 2, 1, 1);
    pause;
}

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

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

Microsoft Dynamics AX 2012 R2 - cos Function


Retrieves the cosine of a real number.


Function

  • real cos(real arg)

Parameters

  • Parameter: arg
  • Description: The number of which to find the cosine.
 
The value of the arg parameter must be in radians.


Return Value

  • The cosine of the specified number.

Example

  • X++
static void cosExample(Args _arg)
{
    real r;
    ;
    r = cos(15);
    print strFmt("Cos of 15 is %1", r);
    pause;
}

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

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

Microsoft Dynamics AX 2012 R2 - corrFlagSet Function


Controls the correction flag for a real number.


Function

  • real corrFlagSet(real real, int arg)

Parameters

  • Parameter: real
  • Description: The number in which to set the correction flag on or off.
 
  • Parameter: arg
  • Description: 0 to set the flag to off; a non-zero value to set the flag to on.

Return Value

  • 0 if the flag is now off; otherwise, a nonzero value if the flag is now on.

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

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

Microsoft Dynamics AX 2012 R2 - corrFlagGet Function


Retrieves the state of the correction flag for a real number.


Function

  • int corrFlagGet(real arg)

Parameters

  • Parameter: arg
  • Description: The flag for which to retrieve the state.

Return Value

  • A non-zero value if the flag is set; zero if it is cleared.

Example

  • X++
The following example displays 1.
static void corrFlagGetExample(Args _args)
{
    real rr;

    rr = corrFlagSet(0.36,2);
    print(corrFlagGet(rr));
}

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

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

Microsoft Dynamics AX 2012 R2 - conPoke Function


Modifies a container by replacing one or more of the existing elements.

Function

  • container conPoke(container container, int start, anytype element, ...)

Parameters

  • Parameter: container
  • Description: The container to modify.
 
  • Parameter: start
  • Description: The position of the first element to replace.
 
  • Parameter: element
  • Description: One or more elements to replace, separated by commas.

 The first element of the container is specified by the number 1.

Return Value

  • The new container with the new elements.

Example

  • X++
static void conPokeExample(Args _arg)
{
    container c1 = ["item1", "item2", "item3"];
    container c2;
    int i;

    void conPrint(container c)
    {
        for (i = 1 ; i <= conLen(c) ; i++)
        {
            print conPeek(c, i);
        }
    }
    ;
    conPrint(c1);
    c2 = conPoke(c1, 2, "PokedItem");
    print "";
    conPrint(c2);
    pause;
}

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

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

Microsoft Dynamics AX 2012 R2 - conPeek Function


Retrieves a specific element from a container.


Function

  • anytype conPeek(container container, int number)

Parameters

  • Parameter: container
  • Description: The container to return an element from.
 
  • Parameter: number
  • Description: The position of the element to return. Specify 1 to get the first element.

The conPeek function automatically converts the peeked item into the expected return type. Strings can automatically be converted into integers and real numbers, and vice versa.


Return Value

  • The element in the container at the position specified by the number parameter.

Example

  • X++
static void conPeekExample(Args _arg)
{
    container c;
    int i;
    ;

    c = conIns(["item1", "item2"], 1);
    for (i = 1 ; i <= conLen(c) ; i++)
    {
        print conPeek(c, i);
    }
    pause;
}

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

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

Microsoft Dynamics AX 2012 R2 - conNull Function


Retrieves an empty container.


Function

  • container conNull()
Use this function to explicitly dispose of the contents of a container.


Return Value

  • An empty container.

Example

  • X++
static void conNullExample(Args _arg)
{
    container c = ["item1", "item2", "item3"];
    ;

    print "Size of container is " + int2str(conLen(c));
    // Set the container to null.
    c = conNull(); 
    print "Size of container after conNull() is " + int2Str(conLen(c));
    pause;
}

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

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