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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.88.85.41.100!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Musing on defining attributes and the ability to define an "abstract type X"-interface. Date: Thu, 20 Jul 2017 22:12:06 +0200 Organization: JSA Research & Innovation Message-ID: <87h8y67trd.fsf@jacob-sparre.dk> References: <9617c73b-e23e-405b-8544-4d17e7e3ad61@googlegroups.com> <28512bf1-0c2c-400f-a24f-cc7e0eb8a02d@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: franka.jacob-sparre.dk; posting-host="88.85.41.100"; logging-data="28482"; mail-complaints-to="news@jacob-sparre.dk" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:rfl8gX1r99/O9WtcXbk2iypfvr4= Xref: news.eternal-september.org comp.lang.ada:47476 Date: 2017-07-20T22:12:06+02:00 List-Id: Shark8 wrote: > No, an array of ASCII is *NO* compatible with an array of Latin-1; the > first is 7-bit data, the latter is 8-bit data. Depends on whether you worry about encoding or just consider ASCII and Latin-1 as character sets. If you're just thinking of character sets, consider: subtype Latin_1_String is Wide_Wide_String with Dynamic_Predicate => (for all C of Latin_1_String => Character'Val (C) < 256); subtype ASCII_String is Latin_1_String with Dynamic_Predicate => (for all C of ASCII_String => Character'Val (C) < 128); Greetings, Jacob -- "War does not determine who is right - only who is left." -- Bertrand Russell