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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,994623ba34b222de X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news2.google.com!news.glorb.com!newsfeed-0.progon.net!progon.net!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada code snippet help (array of arrays) Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <5628eb43-3d56-4b20-976a-6bb0f40dcd49@s31g2000vbp.googlegroups.com> <491646c2-ec53-4f54-9e6e-f89d59f40b76@d38g2000prn.googlegroups.com> Date: Thu, 14 May 2009 19:14:18 +0200 Message-ID: <100oa8l17auxl.1o05hrb8j459.dlg@40tude.net> NNTP-Posting-Date: 14 May 2009 19:14:22 CEST NNTP-Posting-Host: c0977cf7.newsspool3.arcor-online.net X-Trace: DXC=i=GMW`DCKL_E47KDAk81NWMcF=Q^Z^V3X4Fo<]lROoRQ^YC2XCjHcbYHMd:WWeHXa]DNcfSJ;bb[UIRnRBaCd On Thu, 14 May 2009 08:16:22 -0700 (PDT), Adam Beneschan wrote: > On May 14, 1:05 am, Egil H�vik wrote: > >>> T: constant Boolean := True; >>> F: constant Boolean := False; >> >> No need to define your own constants... True and False are >> already enumerated values (constants) of type Boolean. > > I think he defined those just for readability. If you have a large > constant array, it might look better, look more like a chart, take up > less space on the screen, be easier to line up, etc., if you can do it > with shorter names such as single letters. I've seen this sort of > thing done before. Well, in this case I have a better proposal: X : constant Boolean_Array (1..100) := ( 1..10 | 13..15 | 45 | 77 => True, others => False); In fact, need to specify enumeration literals no more than just once! -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de