Changeset 202 for branches/interpreter2/Test.pas
- Timestamp:
- Apr 17, 2020, 12:09:15 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/interpreter2/Test.pas
r200 r202 1 // Line comment 1 2 program Test; 2 3 var 3 A; 4 B; 4 A: string; 5 B: string; 6 X: string; 7 I: Integer; 5 8 const 6 C = 1;9 C: Integer = 1; 7 10 begin 8 A := 2; 9 B := C; 11 X := 'A' + 'B'; 12 WriteLn(X); 13 A := IntToStr(2); 14 B := IntToStr(C); 10 15 A := B; 11 if A then begin 16 17 // If-Then-Else 18 if A = '2' then begin 12 19 WriteLn('DoThen'); 13 20 end else WriteLn('DoElse'); 14 21 15 A := ''; 16 while A do begin 17 WriteLn(A); 22 // While-Do 23 I := 5; 24 while I <> 0 do begin 25 WriteLn(IntToStr(I)); 26 I := I - 1; 27 end; 28 29 // For-To-Do 30 for I := 0 to 5 do begin 31 WriteLn(IntToStr(I)); 18 32 end; 19 33 34 // Begin-End 20 35 begin 21 36 WriteLn('Hello World!');
Note:
See TracChangeset
for help on using the changeset viewer.