Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Arredondamento do VFP
Message
From
28/06/2004 15:14:02
Edson Junio
Sistemas Victory
Goiânia, Brazil
 
 
To
22/06/2004 15:47:04
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brazil
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00916166
Message ID:
00918119
Views:
13
valor_total_venda = 100
diferenca = valor_total_venda
Numero_parcelas = 3
Valor_parcela = valor_total_venda / Numero_parcelas
IF Numero_parcelas > 1
FOR i = 1 TO Numero_parcelas
comando = "diferenca = diferenca - valor_parcela"
&comando
NEXT
Endif

messagebox(alltrim(str(diferenca)))

Se vc rodar este código, verá que a diferença será zero.
Favor, preciso que este resultado final seja 0,01, pois 100/3 = 33.33 e 33.33*3 deve ser 99.99.
Acho que está tendo algum problema de arredondamento.

Agradeço
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform