Loop through irregular enumeration in Delphi

前端 未结 6 834
逝去的感伤
逝去的感伤 2021-01-12 09:31

1) Does anyone know if it is possible to loop through an irregular enumeration in Delphi (XE)?

Looping over a normal enumeration is ok. From Delphi Basics:



        
6条回答
  •  Happy的楠姐
    2021-01-12 10:09

    I always use

    var
      s: TSuit;
    begin
      for s := Low(TSuit) to High(TSuit) do
        {something};
    end;
    

提交回复
热议问题