Jump to content
Anders Melander

Inline array declaration

Recommended Posts

Can someone explain why this fails to compile with E2029 Expression expected but 'ARRAY' found:

begin
  var Stuff: array of integer;
end;

while this works:

type
  TStuff = array of integer;
begin
  var Stuff: TStuff;
  var MoreStuff: TArray<integer>;
end;

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×