home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / insidetp / 1990_05 / caltest2.pas < prev    next >
Pascal/Delphi Source File  |  1990-04-16  |  778b  |  38 lines

  1. PROGRAM CalTest2;
  2.  
  3. USES DOS,CRT,CALUNIT2;
  4. VAR
  5.    MyCalendar: DateSelect;
  6.    TYear,TMonth,TDay,TDOW: Word;
  7. BEGIN
  8.    ClrScr;
  9.    GetDate(TYear,TMonth,TDay,TDOW);
  10.    WITH MyCalendar DO
  11.    BEGIN
  12.       WriteLn('    Current Month''s Calendar');
  13.       WriteLn;
  14.       Init(TMonth, TYear, TDay);
  15.       WHILE (TMonth <> 0) DO
  16.             BEGIN
  17.                 WriteLn;
  18.                 WriteLn('Enter Month, Day and Year');
  19.                 WriteLn('(Separate with spaces)');
  20.                 WriteLn;
  21.                 WriteLn('   exm.      5 1 1990');
  22.                 WriteLn;
  23.                 Write('    or 0 0 0 to quit: ');
  24.                 ReadLn(TMonth, TDay, TYear);
  25.                 IF TMonth <> 0 THEN
  26.                     BEGIN
  27.                         ClrScr;
  28.                         SetYear(TYear);
  29.                        SetMonth(TMonth);
  30.                    SetDay(TDay);
  31.                         DrawCalendar
  32.                  END
  33.             END
  34.    END;
  35.    ClrScr
  36. END.
  37.  
  38.