[fpc-devel] Function variables and overload
Florian Klaempfl
F.Klaempfl at gmx.de
Fri Jul 1 22:34:24 CEST 2005
peter green wrote:
>>>Would it be possible to get something like
>>>
>>> L.Sort(@ICmp(PBigInt,PBigInt));
>>>
>>>in case ICmp is overloaded? If we could add the parameter
>>>types, there would be no more ambiguity, the compiler would
>>
>>There is ambiguity with a normal call to the function. The compiler sees
>>the ( and thinks it is parsing a call to Icmp().
>>
>
> and then sees a type identifier in a syntax thats not a typecast which makes
> it totally clear that this can't be a call.
Really ;)?
What about @ICmp(TObject) ?
>
> i dunno how much complexity supporting this syntax would add to the parser
> though.
>
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
More information about the fpc-devel
mailing list