comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: types and non-contigous ranges
Date: Fri, 27 Feb 2004 17:59:34 -0600
Date: 2004-02-27T17:59:34-06:00	[thread overview]
Message-ID: <103vmg915hgv491@corp.supernews.com> (raw)
In-Reply-To: 403ef778$0$128$edfadb0f@dread11.news.tele.dk

"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.






  reply	other threads:[~2004-02-27 23:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-26 14:17 types and non-contigous ranges Erlo Haugen
2004-02-26 15:52 ` Jacob Sparre Andersen
2004-02-27  7:55   ` Erlo Haugen
2004-02-27 13:00     ` Jacob Sparre Andersen
2004-02-27 13:21       ` Erlo Haugen
2004-02-27 13:58         ` Character encoding (Was: types and non-contigous ranges) Jacob Sparre Andersen
2004-02-26 16:07 ` types and non-contigous ranges Dmitry A. Kazakov
2004-02-27  7:53   ` Erlo Haugen
2004-02-27 23:59     ` Randy Brukardt [this message]
2004-03-01  8:50       ` Erlo Haugen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox