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-Thread: 103376,9ce828272f314121 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news2.google.com!proxad.net!news.cs.univ-paris8.fr!talisker.lacave.net!lacave.net!feeder.xsnews.nl!feeder.news-service.com!post.news-service.com!news1.surfino.com!not-for-mail Message-Id: <1654732.ziOaodTJHS@linux1.krischik.com> From: Martin Krischik Subject: Re: output of enumeration types Newsgroups: comp.lang.ada Date: Tue, 19 Apr 2005 06:56:54 +0200 References: User-Agent: KNode/0.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@surfino.com Organization: Surfino Gmbh NNTP-Posting-Host: 83.169.175.19 (83.169.175.19) NNTP-Posting-Date: Tue, 19 Apr 2005 08:00:21 +0200 X-Trace: a297b42649e75f60c0ab619716 Xref: g2news1.google.com comp.lang.ada:10559 Date: 2005-04-19T06:56:54+02:00 List-Id: Staszek Goldstein wrote: > Thanks for the idea, it is slightly more elegant than my solution. > Nevertheless, I have the impression that this is a deficiency of Ada which > should be dealt with. A solution could be kind of "universal_character" > type, freely convertible to any character type. Well, at least Ada has user definable Character types - which other languages don't have. As for the "universal_character" approach, have you considered the implication of: type roman_digit is ('I','V','X','L','C','D','M'); for roman_digit'Size use 3; You see Character and roman_digit are not directly convertible because they *might* be of different size. And a "universal_character" would need to be 16 bit (32 with Ada 2005*) because of Wide_Character (Wide_Wide_Character in Ada 2005*). Martin * Or perhaps Ada 2006 - the new standart isn't written in stone yet. -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com