PxPlus User Forum
Main Board => Discussions => Language => Topic started by: Danilo David on March 12, 2020, 02:37:11 AM
-
Hi,
Long time ago we had a problem about the comma in NUM function and now we did encounter it again,
Example: When you have
A$="200,05" we expect in the NUM result is 200.05 but when you PRINT NUM(A$) the result is 20005
A$="200,,,,05" PRINT NUM(A$) the result is 20005 also
We try also to change parameter 'TH'=0 and set 'DP'=46 but we get same result
Of-course this is very dangerous in our part, Did anyone encountered this also?
Thank you,
-
The NUM function ignores TH and DP. That is what the documentation says. Example #2 exactly shows that.
We had to deal with this in the past as well. And it took a noticable amount of time to find the reason for our huge results.
The real question is:
Who/What passes decimal values written in national notation to your program? That is quite uncommon.