function _StrToInt(const str: string): integer;var BoMinus : Boolean
i, Dig : integer;begin Result := 0
BoMinus := False
for i := 1 to Length(Str) do begin Dig := Ord(Str) - 48
if (i = 1) and (Dig = -3) then // '-' BoMinus := True else if (i = 1) and (Dig = -5) then // '+' BoMinus := False else if (Dig < 0) or (Dig > 9) then begin Result := 0
Exit
end else Result := Result * 10 + dig
end
if BoMinus then Result := -Result;end;