program enumerated3 (input,output);

 

type MonthAbbrev = (jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec);

     MonthNumber = 1..12;

 

var month : MonthAbbrev;

    monNum : MonthNumber;

  

begin

    monNum := ord(mar);

    writeln (' the number of the month March is ',  monNum);

    for month := jan to dec do

        write (ord(month),' ');

    writeln;

    writeln (' monNum is a subrange of integers from 1..12 ');

    for monNum := 12 downto 1 do

       begin

         write (monNum, ' ');

         monNum := pred(monNum);

       end;

    writeln;

end.