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,95cb9cc00d809d62 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-23 06:55:27 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!news-out.visi.com!hermes.visi.com!uunet!ash.uu.net!world!news From: Robert A Duff Subject: Re: Reading a C record from socket - chicken / egg problem - now complete User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Sat, 23 Nov 2002 14:54:25 GMT Content-Type: text/plain; charset=us-ascii References: <5ad0dd8a.0211230443.4b476252@posting.google.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Organization: The World Public Access UNIX, Brookline, MA Xref: archiver1.google.com comp.lang.ada:31178 Date: 2002-11-23T14:54:25+00:00 List-Id: wojtek@power.com.pl (Wojtek Narczynski) writes: > Another question is: can I declare non-contiguous enumeration > subtypes, or only range x..y? Only ranges. >... I've been unable to figure out how to > declare non-contiguous subtype, so I guess this isn't allowable, but > why? Perhaps perceived compiler complexity? Consider, for example, an array indexed by such a subtype. Also, the constraint-checking code could be rather slow for such a subtype. I don't find that to be a good argument, since too-slow checks can always be suppressed. But the original designers of Ada 83 tried to avoid any kind of "costly" checking code. I have often wanted this feature, too. Not to index arrays, but to use in case statements, for example. - Bob