home *** CD-ROM | disk | FTP | other *** search
- PROGRAM CalTest;
-
- USES DOS,CRT,CalUnit;
-
- VAR
- MyCalendar: Calendar;
- TYear,TMonth,Tday,TDOW: Word;
-
- BEGIN
- ClrScr;
- GetDate(TYear,TMonth,Tday,TDOW);
- WITH MyCalendar DO
- BEGIN
- WriteLn(' Current Month''s Calendar');
- WriteLn;
- Init(TMonth, TYear);
- WHILE (TMonth <> 0) DO
- BEGIN
- WriteLn;
- WriteLn(' Enter a Month and Year');
- WriteLn('(Separate values by a space)');
- WriteLn;
- WriteLn(' exm. 3 1990');
- WriteLn;
- Write (' or 0 0 to quit: ');
- ReadLn(TMonth, TYear);
- IF TMonth <> 0 THEN
- BEGIN
- ClrScr;
- SetYear(TYear);
- SetMonth(TMonth);
- DrawCalendar
- END
- END
- END;
- ClrScr
- END.
-
-