Ignore:
Timestamp:
Aug 9, 2010, 10:34:09 AM (14 years ago)
Author:
george
Message:

Fixed comparasion of name of identificators as types, variables, consts, methods using lowercase.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DelphiToC/UPascalSource.pas

    r44 r45  
    336336begin
    337337  I := 0;
    338   while (I < Count) and (LowerCase(TConstant(Items[I]).Name) <> Name) do Inc(I);
     338  while (I < Count) and (LowerCase(TConstant(Items[I]).Name) <> LowerCase(Name)) do Inc(I);
    339339  if I < Count then Result := TConstant(Items[I]) else begin
    340340    if Assigned(Parent.Parent) then Result := Parent.Parent.Constants.Search(Name)
     
    417417begin
    418418  I := 0;
    419   while (I < Count) and (LowerCase(TType(Items[I]).Name) <> Name) do Inc(I);
     419  while (I < Count) and (LowerCase(TType(Items[I]).Name) <> LowerCase(Name)) do Inc(I);
    420420  if I < Count then Result := TType(Items[I]) else begin
    421421    if Assigned(Parent.Parent) then Result := Parent.Parent.Types.Search(Name)
     
    438438begin
    439439  I := 0;
    440   while (I < Count) and (LowerCase(TVariable(Items[I]).Name) <> Name) do Inc(I);
     440  while (I < Count) and (LowerCase(TVariable(Items[I]).Name) <> LowerCase(Name)) do Inc(I);
    441441  if I < Count then Result := TVariable(Items[I]) else begin
    442442    if Assigned(Parent.Parent) then
     
    463463begin
    464464  I := 0;
    465   while (I < Count) and (LowerCase(TFunction(Items[I]).Name) <> Name) do Inc(I);
     465  while (I < Count) and (LowerCase(TFunction(Items[I]).Name) <> LowerCase(Name)) do Inc(I);
    466466  if I < Count then Result := TFunction(Items[I]) else begin
    467467    if Assigned(Parent.Parent) then Result := Parent.Parent.Methods.Search(Name)
     
    533533begin
    534534  I := 0;
    535   while (I < Count) and (TParameter(Items[I]).Name <> Name) do Inc(I);
     535  while (I < Count) and (TParameter(Items[I]).Name <> LowerCase(Name)) do Inc(I);
    536536  if I < Count then Result := TParameter(Items[I])
    537537    else Result := nil;
Note: See TracChangeset for help on using the changeset viewer.