Sunday 31 January 2016

X++ in AX7: Reals are decimals

AX2012 reals are compiled as System.Decimal when compiling IL code. In AX7 that is the only option.


The main difference between the two is the maximum value supported:
AX 2012:
AX 7:
~ 9E127
~ 8E28


Both numbers should be large enough for most ERP scenarios – but you could get burned when doing arithmetic.



For example in AX7 you get an "Value was either too large or too small for a Decimal" exception when multiplying big reals - like realMax()







In AX 2012 the above would be within the supported range.
Another related improvement is that you now can control the number of decimals when Real based Extended Data Types are persisted in the data base, and the default is now 6 decimals – but that is another story.

No comments:

Post a Comment