Changeset 54 for branches/DelphiToC/USourceCode.pas
- Timestamp:
- Aug 10, 2010, 11:54:18 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DelphiToC/USourceCode.pas
r53 r54 279 279 end; 280 280 281 { TModuleList } 282 283 TModuleList = class(TObjectList) 284 function Search(Name: string): TModule; 285 end; 286 281 287 TProgram = class 282 288 Device: TDevice; 283 Modules: T ObjectList; // TObjectList<TModule>289 Modules: TModuleList; 284 290 constructor Create; 285 291 destructor Destroy; override; … … 321 327 begin 322 328 Device := TDevice.Create; 323 Modules := T ObjectList.Create;329 Modules := TModuleList.Create; 324 330 end; 325 331 … … 677 683 end; 678 684 685 { TModuleList } 686 687 function TModuleList.Search(Name: string): TModule; 688 var 689 I: Integer; 690 begin 691 I := 0; 692 while (I < Count) and (LowerCase(TModule(Items[I]).Name) <> LowerCase(Name)) do Inc(I); 693 if I < Count then Result := TModule(Items[I]) else Result := nil; 694 end; 695 679 696 end. 680 697
Note:
See TracChangeset
for help on using the changeset viewer.