delphi xe2 运行程序报错,高手帮我看一下哈
usesSystem.ioutils;procedureTForm1.butGetFilesClick(Sender:TObject);varfilesarray:tst...
uses System.ioutils;
procedure TForm1.butGetFilesClick(Sender: TObject);
var
filesarray: tstringdynarray;
icount: integer;
begin
filesarray := tdirectory.getfilesystementries(tdirectory.GetCurrentDirectory +
'/../..');
for icount := Low(filesarray) to High(filesarray) do
begin(
ListBox1.Items.Add(filesarray[icount]);
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
self.Caption := 'hello';
Edit1.Text := tdirectory.GetCurrentDirectory;
end;
end.
报错:
[DCC Error] Unit1.pas(42): E2029 ')' expected but ';' found
[DCC Fatal Error] Project1.dpr(5): F2063 Could not compile used unit 'Unit1.pas'
42行:ListBox1.Items.Add(filesarray[icount]); 展开
procedure TForm1.butGetFilesClick(Sender: TObject);
var
filesarray: tstringdynarray;
icount: integer;
begin
filesarray := tdirectory.getfilesystementries(tdirectory.GetCurrentDirectory +
'/../..');
for icount := Low(filesarray) to High(filesarray) do
begin(
ListBox1.Items.Add(filesarray[icount]);
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
self.Caption := 'hello';
Edit1.Text := tdirectory.GetCurrentDirectory;
end;
end.
报错:
[DCC Error] Unit1.pas(42): E2029 ')' expected but ';' found
[DCC Fatal Error] Project1.dpr(5): F2063 Could not compile used unit 'Unit1.pas'
42行:ListBox1.Items.Add(filesarray[icount]); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询