Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

RE: X++ : How to get the fraction numbers without the point?

$
0
0

Try the following piece of code, however I believe it might affect the performance:

   real    number = 123456789.987654321;

   str     value = num2str(number,0,7,0,0);

   str     fraction;

   int     result;

   List segments = new List(Types::String);

   ListEnumerator enumerator;

   segments = strSplit(value, ".");

   enumerator = segments.getEnumerator();

   while(enumerator.moveNext())

   {

       fraction = enumerator.current();

   }

   result = str2int(fraction);

   info(strFmt("%1", result));


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>