variables in WinRunner are not typed, so everything is a variant.
In a previous job working with WinRunner, we had the same condition and had to create custom functions to convert the number.
The sudo functions are basically:
Convert money to num -
Traverse through the string and remove anything not a number or period into another variable, this will allow you to perform the math that is needed on the variable.
Convert Num to Money
Takes a straight number, checks for a decimal value on the right and saves it as it is, then going from the right ot eh left of the string, adds in the commas every 3 digits, and will finally add a $ to the far right positions and return this number.
one of the things that is good and bad with WinRunner was the dealing with strings anyway you wanted, like any scripting language, but then when you need a true format of the information it was a bit hard to deal with everything as you wanted without having to deal with creating these sometime convoluted functions.
hope that helps you down the path you need.
Insanity: doing the same thing over and over again and expecting different results
Thins sounds like a sort of WR coding challenge! [img]/images/graemlins/smile.gif[/img] (ah, I remember those golf challenges published by Charles Reace some years ago ... [img]/images/graemlins/wink.gif[/img] ).
Here is my try:
<font class="small">Code:</font><hr /><pre>
FullCost = "$4,234.25";