Re: [fpc-pascal] function alias

2007-10-06 Thread Johann Glaser
Hi! > procedure OriginalProc(..).. {$IFDEF USEINLINE_ALIAS}inline;{$ENDIF} > begin > end; > ... > > procedure AliasProc(...); > begin > {$DEFINE USEINLINE_ALIAS} > OriginalProc(...); > {$UNDEF USEINLINE_ALIAS} > end; Are you sure this works? AFAIK the "preprocessor" doesn't follow function

Re: [fpc-pascal] function alias

2007-10-06 Thread Mattias Gaertner
On Sat, 6 Oct 2007 21:43:30 +0200 ik <[EMAIL PROTECTED]> wrote: > On 10/6/07, Mattias Gaertner <[EMAIL PROTECTED]> wrote: > > On Thu, 4 Oct 2007 20:17:36 +0200 (CEST) > > Daniël Mantione <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > Op Thu, 4 Oct 2007, schreef Mattias Gaertner: > > > > > > > Ye

Re: [fpc-pascal] function alias

2007-10-06 Thread ik
On 10/6/07, Mattias Gaertner <[EMAIL PROTECTED]> wrote: > On Thu, 4 Oct 2007 20:17:36 +0200 (CEST) > Daniël Mantione <[EMAIL PROTECTED]> wrote: > > > > > > > Op Thu, 4 Oct 2007, schreef Mattias Gaertner: > > > > > Yes, but I hoped to declare it in situ - without adding another > > > type. ;) The re

Re: [fpc-pascal] function alias

2007-10-06 Thread Daniël Mantione
Op Sat, 6 Oct 2007, schreef Mattias Gaertner: > On Thu, 4 Oct 2007 20:17:36 +0200 (CEST) > Daniël Mantione <[EMAIL PROTECTED]> wrote: > > > > > > > Op Thu, 4 Oct 2007, schreef Mattias Gaertner: > > > > > Yes, but I hoped to declare it in situ - without adding another > > > type. ;) The reaso

Re: [fpc-pascal] function alias

2007-10-06 Thread Mattias Gaertner
On Thu, 4 Oct 2007 20:17:36 +0200 (CEST) Daniël Mantione <[EMAIL PROTECTED]> wrote: > > > Op Thu, 4 Oct 2007, schreef Mattias Gaertner: > > > Yes, but I hoped to declare it in situ - without adding another > > type. ;) The reason is that I'm auto translating some C headers > > that contains ali

Re: [fpc-pascal] function alias

2007-10-04 Thread Daniël Mantione
Op Thu, 4 Oct 2007, schreef Mattias Gaertner: > Yes, but I hoped to declare it in situ - without adding another type. ;) > The reason is that I'm auto translating some C headers that contains > aliases for functions. procedure DoAliasSomething(...params...); cdecl; external 'useful'; ... is an

Re: [fpc-pascal] function alias

2007-10-04 Thread Mattias Gaertner
On Thu, 4 Oct 2007 19:58:08 +0200 (CEST) Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > > > 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 > >

Re: [fpc-pascal] function alias

2007-10-04 Thread Michael Van Canneyt
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