[fpc-pascal] alias a function + overload 'in'

Marcos Douglas md at delfire.net
Sun Dec 18 13:31:54 CET 2011


On Sun, Dec 18, 2011 at 9:37 AM, Tomas Hajny <XHajT03 at hajny.biz> wrote:
> On 17 Dec 11, at 21:07, David Emerson wrote:
>
>> two little questions
>>
>> 1. Is it possible to make an alias to a function ... so rather than just
>> re-calling with the same parameters, it's actually the same thing? like the way
>> we can do, e.g., type natural = cardinal, or const GG = 6, but with a function?
>  .
>  .
>
> There are multiple solutions possible:
>
> 1) Making the functions public and creating the aliases as external:
>
> procedure X; public name 'X';
> begin
>  WriteLn (1);
> end;
>
> procedure Y; external name 'X';
>
> begin
>  X;
>  Y;
> end.

What is this syntax using "public name"?

Marcos Douglas



More information about the fpc-pascal mailing list