Problem with Conversion
I'm running TC 8.10.487.7 on Windows XPSP3.
I've a problem with the following code.
----------------------------------
flLastSold = aqConvert.VarToFloat(GetPersonnalAccountSold(strPID,strConnectionString))
resp_Status = WebServices.WsForAdminApps_Epurse.ChargeAccount(fltAmount,strCardId,intConfId,intOperationType)
fltNewSold = aqConvert.VarToFloat(GetPersonnalAccountSold(strPID,strConnectionString))
if ((fltNewSold - flLastSold) <> fltAmount) then
Log.Warning("Problem with Sold. New sold ("&GetPersonalAccountSold(strPID,strConnectionString)&") - Oldsold ("&flLastSold&") <> Amout ("&fltAmount&") loaded")
else
Log.Message("Sold OK")
End If
---------------------------------------
In the attached Case01.jpg , you can see that when fltAmount = 10.01, the If statement is evaluated to True even thoug everything is correct -> Not Correct
In the attached Case02.jpg , you can see that when fltAmount = 11, the If statment is evaluated to False. -> Correct.
My regional settings are set to SwissFrench -> the Decimal separator is the ".".
So i cannot see where is the problem.
Any helps would be appriciate.
Best Regards.