Anonymous user
Calendar - for "REAL" programmers: Difference between revisions
→{{header|Ada}}
Line 22:
=={{header|Ada}}==
In Ada, the task is really easy for "real" programmers, because Ada is case insensitive.
Uses the package "Printable_Calendar" from the [http://rosettacode.org/wiki/Calendar#Ada Ada solution of the calendar task]:▼
▲
<lang Ada>WITH PRINTABLE_CALENDAR;
PROCEDURE REAL_CAL IS
C: PRINTABLE_CALENDAR.CALENDAR := PRINTABLE_CALENDAR.IniT_132
((Weekday_Rep =>
"MO TU WE TH FR SA SO",
(" JANUARY ", " FEBRUARY ",
" MARCH ", " APRIL ",
Line 40 ⟶ 42:
));
BEGIN
C.
C.
C.
Output:
<pre> [SNOOPY]
JANUARY FEBRUARY MARCH APRIL MAY JUNE
Line 66 ⟶ 68:
14 15 16 17 18 19 20 11 12 13 14 15 16 17 15 16 17 18 19 20 21 13 14 15 16 17 18 19 10 11 12 13 14 15 16 15 16 17 18 19 20 21
21 22 23 24 25 26 27 18 19 20 21 22 23 24 22 23 24 25 26 27 28 20 21 22 23 24 25 26 17 18 19 20 21 22 23 22 23 24 25 26 27 28
28 29 30 31 25 26 27 28 29 30 31 29 30 27 28 29 30 31 24 25 26 27 28 29 30 29 30 31 </pre>
To change the output to 80-character devices, replace "Init_132" by "Init_80".
=={{header|ALGOL 68}}==
|