Forum: Object-Pascal / Delphi-Language
Delphi
by xaromz,
18. Apr 2007
Hallo,
Delphi weiß von kritisch oder nicht kritisch überhaupt nichts. Es passt einfach die entsprechenden Aufrufe an. Etwa so:
for i := 1 to 10 do
Memo.Lines := IntToStr(i);
wird zu
for i := 9 downto 0 do
Memo.Lines := IntToStr(10 - i);
Alles in Butter also.
Forum: Object-Pascal / Delphi-Language
Delphi
by xaromz,
18. Apr 2007
Hallo,
das ist die automatische Optimierung von Delphi. Wenn die Schleife rückwärts läuft, muss als Abbruchbedingung nur auf Null getestet werden, was schneller geht. Die Optimierung hat aber keine negativern Auswirkungen auf Deinen Code, das wird vom Compiler entsprechend angepasst.
Gruß
xaromz