Forum Discussion
AlexKaras
13 years agoCommunity Hero
Hi Djordje,
> Log.Message(aqConvert.VarToFloat('0.00003'));
Well, I'll leave this for Support to comment, but actually, this line of code performs two conversions: first string->float when the VarToFloat() is called, and (implicitly) float->string when the Log.Message is called.
I can imagine, that, when working with floats, TestComplete uses their native representation for the calculations and scientific format for the output.
Considering, that XML is, basically, the plain text format and thus, the request to the web service contains plain text data and a description of how these data must be interpreted, I think that you may try to use the aqString.Format() function to format the required float parameter as you need and assign it to the field of the web request. I believe that this should work.
> Log.Message(aqConvert.VarToFloat('0.00003'));
Well, I'll leave this for Support to comment, but actually, this line of code performs two conversions: first string->float when the VarToFloat() is called, and (implicitly) float->string when the Log.Message is called.
I can imagine, that, when working with floats, TestComplete uses their native representation for the calculations and scientific format for the output.
Considering, that XML is, basically, the plain text format and thus, the request to the web service contains plain text data and a description of how these data must be interpreted, I think that you may try to use the aqString.Format() function to format the required float parameter as you need and assign it to the field of the web request. I believe that this should work.