[fpc-pascal] alias a function + overload 'in'
noreply at z505.com
noreply at z505.com
Thu Dec 22 02:20:28 CET 2011
> 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?
>
You can also define procedures and functions as variables or types.
program ...
function OtherFunc: string;
begin
//
end;
var
AliasFunc: function: string = @OtherFunc;
...
begin
AliasFunc();
end.
More information about the fpc-pascal
mailing list