Description:
i want get the max value and min value of decimal by X++ code? but i didn't know how can i write it, if you know , please tell me ,thanks!
thanks, i have nothing to ask.
Thanks for your answer.
Thanks Blue, i got it.
yeah, if we for loop many times , it will exceed the size of the data type. in actual, it has been exceeed the size when for loop to 41. , i check the result of for loop 41, it will exceed the size of max value.
result = -8181818181818182000000000000.0000000000000 * (-10) + (-0.0000000000009)
Yes, that's the range of System.Decimal, as mentioned before.
Hi Apple,
https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-data-primitive
Could you tell us your business requirement and what you are trying to achieve? Since you work in x++, your variable/field must be an x++ real type and you should worry about min/max value of that data type, nothing else.
Your code is designed to exceed the size of the data type sooner or later, which it does, therefore everything look correct. The only remaining question is "What your point?".
sorry, you can check my question, i ask two question, real and decimal, but i misspelled with decimal in the title.
What exactly are you trying to do?
The min/max value of a real field in x++ is the one that is already told to you several times (pointed into Microsoft documentation, and to functions which will show you the value in code).
It seems that even though your original question is now answered many times, you still have some other problem. I suggest sharing your actual problem (including business requirement) right in the beginning to save everyone's time and guarantee best possible help to you.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 2,239
André Arnaud de Cal... 903 Super User 2025 Season 2
Sohaib Cheema 604 User Group Leader