[fpc-pascal] function alias
Michael Van Canneyt
michael at freepascal.org
Thu Oct 4 19:58:08 CEST 2007
On Thu, 4 Oct 2007, Mattias Gaertner wrote:
> How can I create an alias for a function?
> For example:
>
> procedure DoSomething(...params...); cdecl; external 'useful';
>
> const
> DoAliasSomething = DoSomething;
>
> fpc does not allow this. So how can it be done?
program test;
procedure something; external name 'something';
Type
TProcedure = Procedure;
const
DoSomething : TProcedure = @something;
begin
end.
Works fine.
Michael.
More information about the fpc-pascal
mailing list