[fpc-pascal] Re: fpc-pascal Digest, Vol 72, Issue 35

Michael Van Canneyt michael at freepascal.org
Mon Jun 14 13:23:28 CEST 2010



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.



More information about the fpc-pascal mailing list