On 20 Feb 2005, at 18:37, Waldek Hebisch wrote:
The simplest solution is to rename `round' from fp.pas on import like:
import fp (round => fp_round);
Yes, that works for a simple test program.
Which gives me another problem. I've never used 'import' before, just 'uses'. Looking at the GPC manual, 'import' can only be use in a program file not a unit/module. This is rather limiting for me, if true, as my problem code is spread around several units.
Another thing. I noticed is that trunc() has been renamed to truncd() in fp.pas and there is a comment on the microbizz site (http://www.microbizz.nl/gpcdiffs.html) that says this...
<quote> 11. Trunc
In ISO Pascal Trunc is a predefined function that returns an integer value. It is an error if the result value of Trunc doesn't exist in the Integer type. The fp.pas unit of Apple’s PInterfaces declares a trunc function that returns a value of type Double_t.
To solve this ambivalence, the trunc function in fp.pas has been renamed to truncd. </quote>
So this looks like the same problem as I have with Round(), but with a different solution. So I'm now beginning to think think this is a GPCPInterfaces bug (or at least inconsistency). Should round() in fp.pas not have been renamed roundd() for the same reasons?
Regards, Steven