Подтвердить что ты не робот

Разве Delphi когда-либо получал за каждый цикл?

Я читал, что 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;
4b9b3361

Ответ 1

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; 

Ответ 2

Да.

Но это для.. в

Try

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;