Anonymous user
Calendar - for "REAL" programmers: Difference between revisions
m
→{{header|Elena}}
m (BaCon and BBC BASIC moved to the BASIC section.) |
imported>Arakov |
||
Line 1,046:
30 </pre>
=={{header|Elena}}==
ELENA
<syntaxhighlight lang="elena">import system'text;
import system'routines;
Line 1,053:
import extensions'routines;
const MonthNames = new string[]{"JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER"};
const DayNames = new string[]{"MO", "TU", "WE", "TH", "FR", "SA", "SU"};
class CalendarMonthPrinter
{
DayNames.forEach:(name)▼
{ _line.print(" ",name) }
get
set
}
class Calendar
{
Array.allocate(
.populate:(j =>
new CalendarMonthPrinter(
▲ {
{
}
public program()
{
}</syntaxhighlight>
{{out}}
Line 1,246:
27 28 29 30 31 24 25 26 27 28 29 30 29 30 31
</pre>
=={{header|Fortran}}==
Alas, the header "FORTRAN" is not recognised - REAL programmers were absent that day? Even upon the apperance of lower case, I have preferred to use shouting for programme source, and normal upper/lower case for commentary. Aside from petty details such as 1 and l being nowhere as distinct as 1 and L, this allows the two sorts of blather to be identifiably different without ratiocination as the hours drag past. Further, the names of variables can easily be distinguished from the same word in discussion, as in ... the text in TEXT will be printed as the subtitle to the text in TITLE ... Anyway, in the spirit of old, herewith the source without tedious commentary:
|