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 X-Google-Thread: 103376,1b78051e65d4576a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-26 07:53:00 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news2.telebyte.nl!news.jgaa.com!news.hacking.dk!pnx.dk!munin.nbi.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: types and non-contigous ranges Date: 26 Feb 2004 16:52:58 +0100 Organization: Munin Sender: sparre@sparre.crs4.it Message-ID: References: <403e001b$0$144$edfadb0f@dread11.news.tele.dk> NNTP-Posting-Host: sparre.crs4.it Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: munin.grove.home 1077810778 32515 156.148.70.170 (26 Feb 2004 15:52:58 GMT) X-Complaints-To: sparre@munin.nbi.dk NNTP-Posting-Date: Thu, 26 Feb 2004 15:52:58 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:5863 Date: 2004-02-26T16:52:58+01:00 List-Id: Erlo Haugen skrev: > what is the easiest way to define a (sub)type consisting of ranges > and single values? I don't think you can do that. > Let me give an example: > > I want a type, based on character, that contains 'A'..'Z' and '0'..'9' > and some single characters like '�','�' and '�'. > > subtype Valid_Characters is character range 'A'..'Z' ????? and what then?? I think you have to declare it as a new enumerated type: type Valid_Characters is ('0', '1', '2', ... '9', 'A', 'B', 'C', ... '�', '�', '�'); > Do I really have list all the values? I think so (even though I didn't do it in the example). Jacob -- "Any, sufficiently advanced, technology is indistinguishable from magic."