From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a1ce307c10055549 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-17 11:08:56 PST Path: archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!rwcrnsc53.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: calenday (was Re: IBM Acquires Rational Ada References: X-Newsreader: Tom's custom newsreader Message-ID: <9DKL9.380955$P31.141586@rwcrnsc53> NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc53 1040152133 12.234.13.56 (Tue, 17 Dec 2002 19:08:53 GMT) NNTP-Posting-Date: Tue, 17 Dec 2002 19:08:53 GMT Organization: AT&T Broadband Date: Tue, 17 Dec 2002 19:08:53 GMT Xref: archiver1.google.com comp.lang.ada:31975 Date: 2002-12-17T19:08:53+00:00 List-Id: > > > type day_name_type is (mon,tue,wed,thu,fri,sat,sun); > the program could internallly use Sunday, Monday, etc, and then do a table > lookup to find the appropriate String to print. type Day_Name is (Monday, Tuesday ... Short_Day_Name : constant array(Day_Name) of String(1 .. 3) := ("Mon", ... makes it easy to print three letter abbreviations, and Day_Name'image(Day) would print the full (English) names if you want full length names. Going the reverse direction, with an array of different length strings, is rather less convenient. "And on the seventh day He rested" suggests Sunday should be last and Monday first. OTOH, both moon and sun are mere astronomical objects, whereas Thor was a god, so clearly Thursday should be first. ;)