[fpc-devel] Function variables and overload

Marco van de Voort marcov at stack.nl
Mon Jul 4 08:55:41 CEST 2005


On Fri, Jul 01, 2005 at 09:29:35PM +0100, 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.

Types can be parameters to

procedure x ( a : tclass);

..
..

x(tobject);




More information about the fpc-devel mailing list