[fpc-pascal] real to integer

Vincent Snijders vsnijders at quicknet.nl
Tue May 30 08:37:10 CEST 2006


Tony Pelton schreef:
> On 5/29/06, Vincent Snijders <vsnijders at quicknet.nl> wrote:
>>
>> Use a IDE with code tools that support find declaration.
> 
> that is a terrible answer.
> 
> this isn't the "IDE" list, it is the Free Pascal "compiler" list.


Indeed. But sometimes the compiler doesn't give enough information and other tools do.

Another view: An IDE is to help people write code, a compiler is to compile it and 
not to guess what it should have been, if some error occurs.

> 
> i would have beat my head against a wall for days on a problem like that.

Using the wrong tool for the wrong job, I would say. A compiler is to compiler, an 
IDE to write code.

> 
> i would suggest that this is an opportunity to think about error
> reporting in the compiler.
> 
> i would suggest, as a compiler enhancement, maybe ...
> 
> a) the compiler could report ambigous symbols as a warning

AFAIK in this case there were no ambiguous symbols. Only a procedure hidden by an 
other. Some languages don't have  disambiguation rules (C# for example) for 
units/namespaces and always require you to add the unitname (e.g. 
SysUtils.DeleteFile). I don't like that solution.

> b) the error could report fully qualifed symbols on errors

Yes, more verbose error messages are always nice (until they get too verbose).
> 
> i don't know how simple that is for the compiler, but it is simple to
> understand for the programmer.
> 

Vincent



More information about the fpc-pascal mailing list