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,2e6723b897ab47fb X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.82.2 with SMTP id e2mr1650988pay.40.1344299176123; Mon, 06 Aug 2012 17:26:16 -0700 (PDT) Path: c10ni91095pbw.0!nntp.google.com!news2.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Ada.Locales pseudo-string types Date: Mon, 6 Aug 2012 16:46:37 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <78707b6e-88a3-453a-a37c-840f7a62e703@googlegroups.com> <7303f906-0f6a-4d97-ae15-36b4056ede6c@googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 X-Trace: posting.google.com 1344299176 2812 127.0.0.1 (7 Aug 2012 00:26:16 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 7 Aug 2012 00:26:16 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-08-06T16:46:37-07:00 List-Id: On Monday, August 6, 2012 4:23:13 PM UTC-7, Vasiliy Molostov wrote: > >> > It seems to be the "Character range 'a' .. 'z'" that's the problem; > >> > that'll be why the error message was "component subtypes must > >> statically > >> > match". > > >> they should be a subtype of character to be convertable, I suppose. > > > They already are a subtype of Character, i.e. the subtype "Character > > range 'a' .. 'z'". The only way to make it convertible is to get rid of > > the range. > > Sorry my mistake - subtype of string I meant. Making the two types subtypes of String means that you cannot put a constraint on the component subtype. So if we assume that they really want the range constraints 'A'..'Z' and 'a'..'z', the types can't be made subtypes of String. > > The workaround here can be done via 'image() attribute since it always > return string If you mean something like Language_Code'Image(L) or Country_Code'Image(C), that's not legal. 'Image is defined only for scalar types, not array types. -- Adam