On Sat, 14 Dec 2024, Adriaan van Os via fpc-pascal wrote:

Michael Van Canneyt via fpc-pascal wrote:


On Sat, 14 Dec 2024, Adriaan van Os via fpc-pascal wrote:


Macpascal and Iso pascal have procedural parameters, e.g.

    function A( function B: double): double;

Is there a $modeswitch to allow this ? I searched "procedure parameter" and "procedural parameter" in the Language Reference, but could not find anything.

As far as I know, the above is not allowed. you must declare the callback type explicitly.

It can in iso and macpascal mode. Read the Pascal standard.

It's not because something is in the pascal standard, that FPC has it.

But if so, I was unaware and in that case I will document it.

Why they would put something as unreadable as that in the standard is a
mystery to me.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to