Changeset 47 for branches/DelphiToC/UPascalSource.pas
- Timestamp:
- Aug 9, 2010, 12:48:14 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DelphiToC/UPascalSource.pas
r45 r47 57 57 end; 58 58 59 T MethodCall = class(TCommand)60 Method: TFunction;59 TFunctionCall = class(TCommand) 60 FunctionRef: TFunction; 61 61 end; 62 62 … … 185 185 Name: string; 186 186 ValueType: TType; 187 Value: TValue;187 DefaultValue: TValue; 188 188 end; 189 189 … … 194 194 end; 195 195 196 TParameter = class 197 Name: string; 198 ValueType: TType; 199 DafaultValue: TValue; 196 TParameter = class(TVariable) 200 197 end; 201 198 … … 241 238 TFunction = class(TCommonBlock) 242 239 public 240 HaveResult: Boolean; 243 241 Parameters: TParameterList; 244 242 ResultType: TType; … … 439 437 I := 0; 440 438 while (I < Count) and (LowerCase(TVariable(Items[I]).Name) <> LowerCase(Name)) do Inc(I); 441 if I < Count then Result := TVariable(Items[I]) else begin 439 if I < Count then Result := TVariable(Items[I]) else Result := nil; 440 441 if not Assigned(Result) then begin 442 442 if Assigned(Parent.Parent) then 443 443 Result := Parent.Parent.Variables.Search(Name) 444 else Result := nil; 445 end; 446 447 if not Assigned(Result) then begin 448 if Assigned(Parent) and (Parent is TFunction) then 449 Result := TFunction(Parent).Parameters.Search(Name) 450 else Result := nil; 451 end; 452 453 if not Assigned(Result) then begin 454 if Assigned(Parent.Parent) and (Parent.Parent is TFunction) then 455 Result := TFunction(Parent.Parent).Parameters.Search(Name) 444 456 else Result := nil; 445 457 end; … … 533 545 begin 534 546 I := 0; 535 while (I < Count) and ( TParameter(Items[I]).Name<> LowerCase(Name)) do Inc(I);547 while (I < Count) and (LowerCase(TParameter(Items[I]).Name) <> LowerCase(Name)) do Inc(I); 536 548 if I < Count then Result := TParameter(Items[I]) 537 549 else Result := nil;
Note:
See TracChangeset
for help on using the changeset viewer.