[fpc-devel] Compiler bug?
Marco van de Voort
marcov at stack.nl
Sun Jan 31 13:13:39 CET 2010
In our previous episode, Paul van Helden said:
> I have never used the function name instead of "Result", but of course
> you can. Using () after a function to me seems so C-like and
> un-Pascallish but it works.
>
> But it is things like this that trip up people coming from Delphi, I
> guess. Isn't this a potential improvement to the compiler though: scan
> for overloaded functions before assuming that it is the result value
> (like Delphi does)? (Or warn about overloaded functions without
> parameters, similar to mode objfpc disallowing parameter names that are
> the same as methods?)
For what Delphi does, there is $mode delphi. Mode objfpc has a significant
part of the combined FPC/Lazarus dialect written in it, which might actually
use the function result TP style.
More information about the fpc-devel
mailing list