On Thu, 12 Dec 2019, Martin Frb wrote:
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.
Great :(
Hm. I modified the delphi program to check. It also works with a variable...
What kind of braindead "feature" is this ? :(
Michael.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel