[fpc-pascal]Problem using a function as a parameter

Michael Van Canneyt michael.vancanneyt at wisa.be
Mon Feb 12 20:53:28 CET 2001

On Mon, 12 Feb 2001, Mario Thaten wrote:

> Hi everybody,
> I've got a maybe simple question. Today I stumbled about a problem I
> can't determine. The way I saw it in Turbo Pascal years ago, I tried
> to implement a function as a parameter to another function. I'll send
> some example code below.
> fpc yells at it with an Error: Wrong amount of parameters specified.
> Is this not implemented in fpc or am I stuck somewhere else?
> Thanks for your hints in advance,
> begin
>    writeln(integral(1,3,f1));
>    writeln(integral(1,3,f2));

Change this to 
   writeln(integral(1,3, at f1));
   writeln(integral(1,3, at f2));

Or use the -So command-line parameter for more TP compatibility. 
Either should work.
This is probably in the FAQ, and surely in the documentation :-)


More information about the fpc-pascal mailing list