Changeset 7568e5c for doc/theses/jiada_liang_MMath/test.pas
- Timestamp:
- Aug 8, 2024, 10:39:40 PM (3 months ago)
- Branches:
- master
- Children:
- acab1bd
- Parents:
- c1c0efdb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/jiada_liang_MMath/test.pas
rc1c0efdb r7568e5c 4 4 Weekday = Mon..Fri; 5 5 Weekend = Sat..Sun; 6 type Count = ( Zero, One, Two, Ten = 10, Eleven ); 6 type Count = ( Zero, One, Two, Ten = 10, Eleven=10 ); 7 type RR = ( A, B, C ); 8 7 9 var day : Week; 8 10 wday : Weekday; … … 10 12 lunch : array[Week] of Integer; 11 13 cnt : Count; 14 // procedure P1(v:Week); 15 // begin 16 // Writeln('Week'); 17 // end; 18 procedure P1(v:Weekday); 19 begin 20 Writeln('Weekday'); 21 end; 22 procedure P1(v:RR); 23 begin 24 Writeln('RR'); 25 end; 12 26 begin 13 27 day := Sat; … … 40 54 Writeln(); 41 55 for day := Mon to Sat do 56 lunch[day] := ord(day) * 10; 57 for day := Mon to Sun do 42 58 Write( lunch[day], ' ' ); 43 59 Writeln(); … … 45 61 Write( ord( cnt ), ' ' ); 46 62 end; 63 day := Tue; 64 P1( day ); 47 65 Writeln(); 66 67 case (day) of 68 Mon: writeln('Excellent!' ); 69 Tue: writeln('Well done' ); 70 end; 48 71 end. 49 72
Note: See TracChangeset
for help on using the changeset viewer.