[fpc-devel] Local procedures as procedural parameter
jonas at zeus.ugent.be
Mon Mar 14 11:24:16 CET 2005
On 14 mrt 2005, at 11:11, Marco van de Voort wrote:
>>>> StoredF : Function (x : real) : real
>>> This is not allowed. Only TP style is allowed with VAR, so
>>> var stored : TSomeFunc;
>> That's not true, the above is perfectly valid (but it creates a
>> procedural variable, and not an "ISO-style procedural variable", as
>> those simply do not exist).
> That's another possibility.
That's not merely a possibility, that's how FPC, TP and Delphi work.
> I was just naming a way to avoid the problem.
> You specify/implemented another, but the point was that it doesn't
> to be a problem :-)
You said that "Only TP style is allowed with VAR", but "Var StoredF :
Function (x : real) : real;" *is* TP style.
More information about the fpc-devel