Я читал, тот Delphi, как предполагалось, добирался для каждого цикла в Delphi 9. Эта функциональность когда-либо превращала его на язык? Мой IDE Delphi 2009, кажется, не распознает для каждого синтаксиса. Вот мой код:
procedure ProcessDirectory(p_Directory, p_Output : string);
var
files : TStringList;
filePath : string;
begin
files := GetSubfiles(p_Directory);
try
for (filePath in files.Strings) do
begin
// do something
end;
finally
files.Free;
end;
end;
procedure ProcessDirectory(p_Directory, p_Output : string);
var
files : TStringList;
filePath : string;
begin
files := GetSubfiles(p_Directory);
try
for filePath in files do
begin
// do something
end;
finally
files.Free;
end;
end;
Да.
Но это для..в
Попробуйте
var
s: string;
c: char;
begin
s:=' Delphi Rocks!';
for c in s do //<--- here is the interesting part
begin
Application.MainForm.Caption:=Application.MainForm.Caption+c;
Sleep(400); //delay a little to see how it works
end;