Hi all,
As i'm working on a program for the euro-conversion of an accountancy application, i have to convert the customer history from whatever currency it is in, to euros.
In this case, all i need to do is recalc the exchange rate.
To this end, i do a REPLACE command which looks something like this:
REPLACE ALL h_excrate WITH 40.3399 / h_excrate
The result is however that 40.3399 divided by 40.3399 is 1.0085 instead of 1.0000 ???
If i go through the file with a loop and just
REPLACE NEXT 1 h_excrate WITH 40.3399 / h_excrate
the results are correct (though slower)
I have to admit i'm rather baffled. I tried setting the decimals to 5, but that didn't help either.
Does anyone have any suggestions ?
Jan Schenkel.
PS: i'm running FoxPro 2.6a Win with the patches installed.
"As we grow older, we grow both wiser and more foolish at the same time." (De Rochefoucald)
As i'm working on a program for the euro-conversion of an accountancy application, i have to convert the customer history from whatever currency it is in, to euros.
In this case, all i need to do is recalc the exchange rate.
To this end, i do a REPLACE command which looks something like this:
REPLACE ALL h_excrate WITH 40.3399 / h_excrate
The result is however that 40.3399 divided by 40.3399 is 1.0085 instead of 1.0000 ???
If i go through the file with a loop and just
REPLACE NEXT 1 h_excrate WITH 40.3399 / h_excrate
the results are correct (though slower)
I have to admit i'm rather baffled. I tried setting the decimals to 5, but that didn't help either.
Does anyone have any suggestions ?
Jan Schenkel.
PS: i'm running FoxPro 2.6a Win with the patches installed.
"As we grow older, we grow both wiser and more foolish at the same time." (De Rochefoucald)