[fpc-devel] Function variables and overload

Gerhard Scholz gs at g--s.de
Sat Jul 2 18:21:11 CEST 2005

> Bram Kuijvenhoven wrote:
> > function MyOverloadedFunc:boolean; alias MyOverLoadedFuncNoParams;
> > function MyOverloadedFunc(i:integer):boolean; alias MyOverLoadedFuncInt;
> > Another note is that the 'alias' keyword might already be in use for some
other purpose (I don't exactly remember which), so we might need another keyword
or construction to give alias names.
> I'd prefer the import syntax, using "name" instead of "alias".
> DoDi

ALIAS is already in use for giving a proc another external name, but in the form

    procedure ping ; alias : 'pang' ;

(remark the colon followed by string)

so, the form

    procedure ping; alias pong ;

should be parsable by the compiler. Still conbinations would be valid:

    procedure ping ; alias pong ; alias : 'pang'

I think this looks better than using the NAME keyword.

IMHO the really worst solution would be to introduce a new keyword. This
inflation of keywords is a similar horror as inflation of money, and forces me
from time to time to change sources.


More information about the fpc-devel mailing list