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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,77bf8fb943650b32 X-Google-Attributes: gid103376,public From: johnherro@aol.com Subject: Re: type declaration problem(beginner) Date: 1997/03/03 Message-ID: <19970303181200.NAA21239@ladder02.news.aol.com>#1/1 X-Deja-AN: 222798758 References: <1997Feb26.120011.27@whisky> X-Admin: news@aol.com Organization: AOL http://www.aol.com Newsgroups: comp.lang.ada Date: 1997-03-03T00:00:00+00:00 List-Id: I wrote: >> type Set_Type is array(Month) of Boolean; ... >> Short_Months : Set_Type := Set_Type'(Feb|Apr|Jun|Sep|Nov => True, others => False); Robert Dewar wrote: > there is no point in putting in unnecessary > qualifications, and this one is unnecessary... > Write the qualification only if it helps readability > (in the quoted case, it clearly does NOT do so) Robert is right, of course. The rules about when qualification was necessary when "others" followed named notation were quite complicated in Ada 83, and as I teacher I recommended that students always qualify the aggregate in such cases, rather than learn the complex rules. For example, after a "return" statement in a function, such qualification was unnecessary, but in the above example, the qualification *was* necessary in Ada 83. In Ada 95 the rules regarding this are simpler. Assuming the original poster, Scott Dawkins, is using an Ada 95 compiler (and that's the assumption here in comp.lang.ada unless the poster says otherwise), the qualification, although accepted by the compiler, is unnecessary. - John Herro Software Innovations Technology http://members.aol.com/AdaTutor ftp://members.aol.com/AdaTutor