このコードをdelphi7で変換する方法...
procedure Tform1.button1.click(sender: tobject);
var
LTZID: string;
begin
// Write each time zone ID on the console
for LTZID in TBundledTimeZone.KnownTimeZones(true) do
WriteLn(LTZID);
end;
ありがとうございました...
procedure Tform1.button1.click(sender: tobject);
var
i: Integer;
begin
// Write each time zone ID on the console
for i := Low(TBundledTimeZone.KnownTimeZones(true))
to High(TBundledTimeZone.KnownTimeZones(true)) do
WriteLn(TBundledTimeZone.KnownTimeZones(true)[i]);
end;
または、少し最適化されています:
procedure Tform1.button1.click(sender: tobject);
var
KnownTimeZones: TStringDynArray;
i: Integer;
begin
// Write each time zone ID on the console
KnownTimeZones := TBundledTimeZone.KnownTimeZones(true);
for i := Low(KnownTimeZones) to High(KnownTimeZones) do
WriteLn(KnownTimeZones[i]);
end;