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.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to