Ignore:
Timestamp:
May 19, 2022, 10:39:34 PM (2 years ago)
Author:
chronos
Message:
  • Modified: Use first capital letter in identifiers.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/UCommon.pas

    r424 r447  
    4242  clLightRed = TColor($8080FF);
    4343
    44 function AddLeadingZeroes(const aNumber, Length : integer) : string;
     44function AddLeadingZeroes(const aNumber, Length : Integer) : string;
    4545function BinToInt(BinStr: string): Int64;
    4646function BinToHexString(Source: AnsiString): string;
     
    9696function BinToInt(BinStr : string) : Int64;
    9797var
    98   i : byte;
     98  I : Byte;
    9999  RetVar : Int64;
    100100begin
    101101  BinStr := UpperCase(BinStr);
    102   if BinStr[length(BinStr)] = 'B' then Delete(BinStr,length(BinStr),1);
     102  if BinStr[Length(BinStr)] = 'B' then Delete(BinStr,Length(BinStr),1);
    103103  RetVar := 0;
    104   for i := 1 to length(BinStr) do begin
    105     if not (BinStr[i] in ['0','1']) then begin
     104  for I := 1 to Length(BinStr) do begin
     105    if not (BinStr[I] in ['0','1']) then begin
    106106      RetVar := 0;
    107107      Break;
    108108    end;
    109     RetVar := (RetVar shl 1) + (byte(BinStr[i]) and 1) ;
     109    RetVar := (RetVar shl 1) + (Byte(BinStr[I]) and 1) ;
    110110  end;
    111111
     
    435435end;
    436436
    437 function AddLeadingZeroes(const aNumber, Length : integer) : string;
     437function AddLeadingZeroes(const aNumber, Length : Integer) : string;
    438438begin
    439439  Result := SysUtils.Format('%.*d', [Length, aNumber]) ;
     
    614614  begin
    615615    for J := ReadFrom to Len do
    616       if (S[j] = C) then
     616      if (S[J] = C) then
    617617      begin
    618618        Result := J;
     
    631631    Inc(I);
    632632    APos := ReadUntil(I, '<');
    633     Result := Result + Copy(S, I, APos - i);
     633    Result := Result + Copy(S, I, APos - I);
    634634    I := ReadUntil(APos + 1, '>');
    635635  end;
Note: See TracChangeset for help on using the changeset viewer.