Changeset 148 for branches/easy compiler/UFormMain.pas
- Timestamp:
- Jan 17, 2018, 5:27:23 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/easy compiler/UFormMain.pas
r147 r148 51 51 procedure TForm1.FormShow(Sender: TObject); 52 52 begin 53 with MemoSource.Lines do begin53 { with MemoSource.Lines do begin 54 54 Add('Begin'); 55 55 Add('var I Integer'); … … 59 59 Add('PrintLn I'); 60 60 Add('Decrement I 1'); 61 Add('If Zero I');61 Add('IfEqual I 0'); 62 62 Add('Break'); 63 63 Add('End'); 64 64 Add('End'); 65 65 end; 66 {with MemoSource.Lines do begin66 with MemoSource.Lines do begin 67 67 Add('PrintLn ''Super Calculator'''); 68 68 Add('var Value1 Integer'); … … 103 103 Add('PrintLn Text3'); 104 104 end; 105 105 } 106 106 with MemoSource.Lines do begin 107 Add('Begin'); 108 Add('Var AnimalName StringArray'); 109 Add('Var AnimalProperty StringArray'); 110 Add('Var AnimalCount Integer'); 111 Add('Var Answer String'); 112 Add('Var I Integer'); 107 113 Add('Assign AnimalName[0] ''an elephant'''); 108 114 Add('Assign AnimalProperty[0] ''It is big and slow'''); … … 122 128 Add('IfEqual Answer ''y'''); 123 129 Add('Begin'); 124 Add('PrintLn ''That ''s clear. It is ''');130 Add('PrintLn ''Thats clear. It is '''); 125 131 Add('PrintLn AnimalName[I]'); 126 132 Add('Break'); 127 133 Add('End'); 128 Add('Increment I ');129 Add('If HigherOrEqual I AnimalCount');134 Add('Increment I 1'); 135 Add('IfEqual I AnimalCount'); 130 136 Add('Break'); 131 137 Add('End'); … … 138 144 Add('PrintLn '''''); 139 145 Add('End'); 140 end; 141 } 146 Add('End'); 147 end; 148 142 149 end; 143 150
Note:
See TracChangeset
for help on using the changeset viewer.