On Mon, 14 Jun 2010, Roger Bailey wrote:
On 12 Jun 2010, at 11:00, Michael Van Canneyt wrote:
TestFunction := ActualParameter ( ) ; { compiles and runs o.k. }
[MVC:] The addition of () actually calls the function.
TestFunction := ActualParameter ; { gives "incompatible type" error, but
... }
[MVC:] Here you try to assign the ActualParameter (a function pointer) to the
result (an integer). This of course gives a type error.
TestFunction := NamedFunction ; { ... compiles and runs o.k. }
[MVC:] This is simply a regular function call.
Sorry, but this simply wrong. The LRG (page 95) does not require an "actual
parameter list" for a syntactically correct function call.
What is simply wrong ? My explanation or the behaviour of the compiler ?
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal