Changeset 73 for Generics/TemplateGenerics/Demo/UMainForm.pas
- Timestamp:
- Oct 28, 2010, 5:41:05 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Generics/TemplateGenerics/Demo/UMainForm.pas
r72 r73 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ComCtrls, ListInteger, ListString, DictionaryString ;9 ComCtrls, ListInteger, ListString, DictionaryString, QueueInteger; 10 10 11 11 type … … 14 14 15 15 TMainForm = class(TForm) 16 ButtonQueueInteger: TButton; 16 17 ButtonDictionaryString: TButton; 17 18 ButtonIntegerList: TButton; … … 20 21 procedure ButtonDictionaryStringClick(Sender: TObject); 21 22 procedure ButtonIntegerListClick(Sender: TObject); 23 procedure ButtonQueueIntegerClick(Sender: TObject); 22 24 procedure ButtonStringListClick(Sender: TObject); 23 25 procedure FormCreate(Sender: TObject); … … 64 66 WriteLn('Last: ' + IntToStr(Last)); 65 67 MoveItems(3, 2, 3); 68 WriteLn('Implode: ' + Implode(',', IntToStr)); 69 finally 70 Free; 71 end; 72 end; 73 74 procedure TMainForm.ButtonQueueIntegerClick(Sender: TObject); 75 var 76 Queue: TQueueInteger; 77 I: Integer; 78 begin 79 MemoOutput.Clear; 80 WriteLn('TQueueInteger test'); 81 Queue := TQueueInteger.Create; 82 with Queue do try 83 Enqueue(1); 84 Enqueue(2); 85 Enqueue(3); 86 WriteLn('Implode: ' + Implode(',', IntToStr)); 87 WriteLn('Enqueue: 4'); 88 Enqueue(4); 89 WriteLn('Implode: ' + Implode(',', IntToStr)); 90 WriteLn('Dequeue: ' + IntToStr(Dequeue)); 66 91 WriteLn('Implode: ' + Implode(',', IntToStr)); 67 92 finally
Note:
See TracChangeset
for help on using the changeset viewer.