[fpc-devel] open array calling [[was: Re: C-block reference syntax (blocker for 3.2)]]
Martin Frb
lazarus at mfriebe.de
Thu Dec 12 17:20:40 CET 2019
On 12/12/2019 17:14, Michael Van Canneyt wrote:
> On Thu, 12 Dec 2019, Sven Barth via fpc-devel wrote:
>> For array of const it is not allowed, but any other open array parameter
>> allows it.
>
> Really, are you sure ? Since when is this allowed ?
It works with a variable in the param list, but not with a constant.
program Project1;
procedure Foo(a: array of integer);
begin end;
var a: integer;
begin
foo(a);
// foo(1); // fails
end.
And then it also works for array of const
program Project1;
procedure Foo(a: array of const);
begin end;
var a: TVarRec;
begin
foo(a);
end.
More information about the fpc-devel
mailing list