home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / MISC / ADA_TUT3.ZIP / TOMORROW.ANS (.png) < prev    next >
ANSi Art File  |  1994-08-22  |  876 b   |  640x320  |  1-bit (2 colors)
   ocr: Our solution to Uutside Assignment 3: separate (Nextdate) function lomorroulioday : in Date) return Date is Length : arraythionth_Iype) of Day_Subtype := (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); Answer : Date; begin if Today. Year mod 4 = 0 and (Today.Year mod 100 /= 0 or Today.Year mod 400 = 0) then Length(reb) := 29; end if; if Today.Day /= LengthtToday.honth) then Not end of month. Answer := (Today.Day + 1, Today.Month, Today. Year); elsif Today.Month /= Dec then End of month, but not end of year. Answer := (1, Month_T Type' Succ(Today.honth), Today. - Year); else End of year. Answ ...