Try this now...
I included Set Decimals 20, Set Exact On, extra debugs to trace the value of nTest_Decimals
- Code: Select all Expand view RUN
#include "fivewin.ch"
procedure start()
Local nTest_Decimals := 3, nBkpDecimals := -999
Set Decimals to 20
Set Exact on
oSQLite := TSQLiteServer():New( "test.sql" )
If oSQLite:lError
msgStop( "error" )
RETURN
EndIf
cQuery:="SELECT * from t_tables;"
oQry:=oSQLite:Query(cQuery)
nBkpDecimals := nTest_Decimals
nTest_Decimals :=oQry:aData[1,7]
If nTest_Decimals == nBkpDecimals
MsgInfo("Identical values")
else
MsgInfo("Compare decimals values")
If AllTrim(Str(nTest_Decimals,25,20)) != AllTrim(Str(nBkpDecimals,25,20))
MsgInfo(AllTrim(Str(nTest_Decimals,25,20)),"nTest")
MsgInfo(AllTrim(Str(nBkpDecimals,25,20)),"nBkp")
else
MsgInfo("Equal strings")
end
End
oQry:End()
oSQLite:End()
msginfo(nTest_Decimals )
msginfo(valtype(nTest_Decimals ))
msginfo(str(88.456,10,3)) && return 88.456
msginfo(str(88.456,10,nTest_Decimals )) && RETURN 88 !!!
return
function gettemppath()
return("")