Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger


Monday, September 5, 2011

Real Data Type Declaration in Microsoft Dynamics AX X++

A real variable can consist of decimal number and integers. It spans a range of –(10)127 to (10)127 with a precision of 16 significant digits. It is worth mentioning that even though your locale use comma as decimal separator the code in AX accepts only period as comma separator.
When the code is executed, however, the print will show the decimal separator that is set in your regional settings.
In my Norwegian locale the next Job will print The car has used an average of 3,61 gallons gas.

static void Datatypes_real1(Args _args)
{
real mileage;
real mpg;
;
mileage = 127.32;
mpg = 35.24;
print strfmt("The car has used an average of %1 gallons gas",
mileage/mpg);
pause;
}
There are also some useful functions to use with the real data type in AX. Some of the most used ones are:

No comments:

Post a Comment

Archives