[fpc-pascal] Mode Delphi and functions as parameters.
vfclists .
vfclists at gmail.com
Mon Mar 23 11:13:54 CET 2015
On 18 March 2015 at 14:49, vfclists . <vfclists at gmail.com> 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?
>
> --
> Frank Church
>
> =======================
> http://devblog.brahmancreations.com
>
More questions on Mode Delphi.
1. Does Mode Delphi simply allow Delphi syntax to be compiled, or does it
also affect the code generation, like data structures, pointer handling,
parameter handling / calling conventions, stack frames etc?
2. When Mode Delphi is applied to a project, ie the .dpr, does it affect
the whole project, or does each project require its own mode delphi
statement?
3. Can it be switched on and off within the same unit, ie some procedures
and data structures use it, some don't?
--
Frank Church
=======================
http://devblog.brahmancreations.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150323/eb7aa3c6/attachment.html>
More information about the fpc-pascal
mailing list