Rád bych upozornil na chybu v použití inline, která vede na chybu resp. varování ([DCC Warning] Unit1.pas(570): H2135 FOR or WHILE loop executes zero times - deleted), tato chyba je způsobena použitím inline tam, kde jsou interní odkazy na jiné (ne-inlinovatelné) funkce (nebo se jedná o vnitřní funkci v metodě) viz typický příklad:
{Copy of the part of the RALib}
function SubStr(const S: string; const index: integer; const Separator: string): string; //cannot be inline !!!
var
i: integer;
pB, pE: PChar;
begin
Result := '';
if ((index < 0) or ((index = 0) and (Length(S) > 0) and (S[1] = Separator))) or (Length(S) = 0) then
Exit;
pB := PChar(S);
for i := 1 to index do
begin
pB := StrPos(pB, PChar(Separator));
if pB = nil then exit;
pB := pB + Length(Separator);
if pB[0] = #0 then exit;
end;
pE := StrPos(pB + 1, PChar(Separator));
if pE = nil then pE := PChar(S) + Length(S);
if not (AnsiStrLIComp(pB, PChar(Separator), Length(Separator)) = 0) then
SetString(Result, pB, pE - pB);
end;
Delphi 2005 toto nezkousne, ale vyšší verze už ano s warningem.