Convert Currency Text to Number
Converts text containing currency value to number (for example, $99.50 becomes 99.5)
Please note: The command will be compatible with the currency settings in your simulation preferences.
Parameters
- Text - Text containing currency expression of value
- Number - Returned numerical value
- Fault - Returned as a non-zero fault code financial value is found
Examples
Example 1
On Button Click Logic
SET gblText = “$123.45”
Convert Currency Text to Number gblText, gblNumber, “”
The above example will convert $123.45 to 123.45, and store it in the variable gblNumber.
Example 2
On Button Click Logic
SET gblText = “$123.45”
Convert Currency Text to Number “$900.00”, gblNumber, “”
The above example takes the string of “$900.00” and will store it in the variable gblNumber as the value 900.
Comments
This command is only available with Simul8 Professional 2017 and later.