on my application the total is 58.29
but if I make the calc the total is 58.28
why it los a 0,01 ?
nTotDoc:= 63.65
nTotRitenute:= 5.37
nTotDovuto := nTotDoc-nTotRitenute
how I can make to have the same result ?
my app
another app ( not mine)
#Include "FiveWin.ch"
#xtranslate round(<nVal>,<nDec>) => val(str(<nVal>,20,<nDec>))
FUNCTION Test_Round()
LOCAL nRound, nTotDoc, nTotDacc, nTotDov
nRound := 0.00
nTotDoc := 63.65
nTotDacc := 5.37
nTotDov := ( nTotDoc ) - ( nTotDacc )
nRound := Round( Val( StrZero( nTotDov, 12, 2 ) ), 4 )
? ROUND( nRound, 2 ) // 58.28
RETURN NIL
karinha wrote:
- Code: Select all Expand view
#Include "FiveWin.ch"
#xtranslate round(<nVal>,<nDec>) => val(str(<nVal>,20,<nDec>))
FUNCTION Test_Round()
LOCAL nRound, nTotDoc, nTotDacc, nTotDov
nRound := 0.00
nTotDoc := 63.65
nTotDacc := 5.37
nTotDov := ( nTotDoc ) - ( nTotDacc )
nRound := Round( Val( StrZero( nTotDov, 12, 2 ) ), 4 )
? ROUND( nRound, 2 ) // 58.28
RETURN NIL
there is a bug on harbour
not run round function
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 45 guests