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,1b78051e65d4576a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-27 16:02:42 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!elnk-pas-nf1!newsfeed.earthlink.net!sn-xit-02!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: types and non-contigous ranges Date: Fri, 27 Feb 2004 17:59:34 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <103vmg915hgv491@corp.supernews.com> References: <403e001b$0$144$edfadb0f@dread11.news.tele.dk> <403ef778$0$128$edfadb0f@dread11.news.tele.dk> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:5912 Date: 2004-02-27T17:59:34-06:00 List-Id: "Erlo Haugen" <_elh_@_tema_._com_> wrote in message news:403ef778$0$128$edfadb0f@dread11.news.tele.dk... > I want to use the set/type like this: > My_array : array[Valid_Characters] of something; > That excludes the character set, I guess. No, that excludes using an array. :-) There is no such thing as discontiguous ranges in Ada; you'll have to create it yourself somehow. Ada.Strings.Maps is the easiest way for this particular case. For the array, I'd just make it an array (Character) of something, and just not use the 'invalid' slots. It's hardly worth the effort to do anything else unless "something" is very large. Randy.