Notifications
Announcements
No record found.
I am working in Ax2012 and I need to convert a double to a real.
What method can I use?
*This post is locked for comments
HI Peter,
Doable to real is implicitly marshaled, please refer for details msdn.microsoft.com/.../cc584291.aspx Also please be accurate with tags you are using, 2012 is not a current version.
Apologies for the wrong tag. I am working on something else today. Will provide details tomorrow.
Thanks Ievgen. I scanned that microsoft document several times before I posted. Maybe I missed something, not sure.
Thanks Crispin. The assurance that it should work helped me reach the solution.
In any case, I found the issue: My method returns an EDT real. If I return the double, I get an error (I wrongly assumed that it would still get marshaled). If I assign the double to a real and then return the real it works fine. (My eyelid encountered a nasty twitch when I realised the issue).
Figure 1: Returning a double creates error
Figure 2: Assignig to EDT Real first runs fine
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 Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Priya_K 4
Martin Dráb 4 Most Valuable Professional
Ali Zaidi 2