[fpc-devel] Syntax problem with function result

Daniël Mantione daniel.mantione at freepascal.org
Wed Jul 28 17:27:24 CEST 2010



Op Wed, 28 Jul 2010, schreef Florian Klaempfl:

> Am 28.07.2010 15:10, schrieb Hans-Peter Diettrich:
>> Florian Klaempfl schrieb:
>>
>>>> IMO we should have at least an option, that a function name can *not* be
>>>> used for the function result any more, for the result we have the Result
>>>> variable. Then we can safely distinguish between function calls (by
>>>> function name) and results (by "Result"). If ever required, local
>>>> functions still can refer to the result of some enclusing function, by
>>>> e.g. qualified <function_name>.Result.
>>>>
>>>
>>> I think for this purpose a hint is enough.
>>
>> Can it be implemented ASAP, or is a feature request required?
>
> If none of the other developers refuse till tomorrow, I'll apply the
> patch of Jeppe.
>
> Anybody else opinions if a hint would be better than the mode switch?

If I understand it well this patch will disable not only the fpc 
externsion:

writeln(name_of_function);

... but also the standard Pascal:

name_of_function:=value;

Why would we want to disable the standard Pascal solution?
Why not disable the Borland "result" extention?

Daniël


More information about the fpc-devel mailing list