
How to convert a string that contains a space (ex: 4 600) to a real?
The str2Num function would return "4" instead of "4600,00".
Regards,
*This post is locked for comments
I have the same question (0)You have many options. If the problem is just with spaces, you can simply remove them by strRem(). You could do it more general by actually keeping valid characters (strKeep()), but you would still have to be careful about things like the decimal mark.
In more complex scenarios, I would consider using System.Single::Parse().
You may be also interested in checking whether a number is actually valid - str2NumOk() can be used for that.