I am failing to inline constructs such as
var FileName: array[0..2047] of Char;
This works:
procedure TForm1.AcceptFiles(var Msg: TWMDropFiles);
var FileName: array[0..2047] of Char;
begin
DragQueryFile(msg.Drop, $FFFFFFFF, FileName, 2048);
...
end;
But this fails if FileName
is inlined:
procedure TForm1.AcceptFiles(var Msg: TWMDropFiles);
begin
var FileName: array[0..2047] of Char; // E2029 Expression expected but array found
DragQueryFile(msg.Drop, $FFFFFFFF, FileName, 2048);
...
end;
I managed to inline 12K of variables of any kind, but it seems like anything of the below form can not be inlined:
begin
var Name: array[X..Y] of Z;
end;
Please advice how it is done in Rio 10.3.3.