[fpc-pascal] Mode Delphi and functions as parameters.
Michael Van Canneyt
michael at freepascal.org
Wed Mar 18 16:19:48 CET 2015
On Wed, 18 Mar 2015, vfclists . wrote:
>
> I have recently compiled projects which were converted from Delphi and it seems to me that the passing a function as a parameter does not require the '@' symbol. I suspect syntax
> errors came because I wasn't compiling from the command line.
>
> e.g
>
> function AFunction()
> begin
>
> end;
>
> CallFunctionWithFunctionParameter (AFunction) instead of CallFunctionWithFunctionParameter (@AFunction)
>
> Is passing a function as parameter without the '@' symbol accepted in Delphi?
If you use Delphi mode: yes.
Michael.
More information about the fpc-pascal
mailing list