Re: Re[2]: [fpc-pascal] real to integer

2006-05-30 Thread Jonas Maebe
On 30 mei 2006, at 12:10, Пётр Косаревский wrote: The compiler already gives unit information in case you have conflicting types for making it easier to debug such problems. I don't see why it shouldn't do the same for used function definitions. This is fpc-pascal maillist, I don't insist, th

Re[2]: [fpc-pascal] real to integer

2006-05-30 Thread Пётр Косаревский
> The compiler already gives unit information in case you have > conflicting types for making it easier to debug such problems. I > don't see why it shouldn't do the same for used function definitions. > Jonas program A; // "Bad" program uses sysutils,windows; const B:shortstring='1.txt'; begi

Re[2]: [fpc-pascal] real to integer

2006-05-30 Thread Пётр Косаревский
> > i would have beat my head against a wall for days on a problem like that. It was absolutely unexpected by me. You saw: unit order matter very much and both units may be without sources (people are not supposed to install sources every time). Signalling error "wrong type", when I have correc

Re[2]: [fpc-pascal] real to integer

2006-05-29 Thread Пётр Косаревский
> > While compiler gives a hint about "true" declaration, it does not point to > > the problematic unit. > Use a IDE with code tools that support find declaration. > In your case Lazarus would for example have jumped to an include file that > that > contains the wrong declaration. Search include

Re[2]: [fpc-pascal] real to integer

2006-05-29 Thread Пётр Косаревский
> The problem is that Apple's universal interfaces also include a > "round" function, which returns a real instead of an integral type. How can one find such a thing himself without trial&error? Some time ago I had a similar problem with "bool DeleteFile(PChar)" function in Windows API and s