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,640b65cbfbab7216 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,CP1252 Path: g2news1.google.com!postnews.google.com!c65g2000hsa.googlegroups.com!not-for-mail From: christoph.grein@eurocopter.com Newsgroups: comp.lang.ada Subject: Re: Ada.Strings.Bounded Date: Tue, 22 Apr 2008 23:40:55 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <144w648u50r6q.1erjxxu0cplbw.dlg@40tude.net> <611360e0-595c-43a7-b5cb-137a278ec0c1@s13g2000prd.googlegroups.com> <15389tuelo6x6$.1c1a6yixordts$.dlg@40tude.net> <4c1be2a2-0178-4c1f-8c96-526020550f42@w4g2000prd.googlegroups.com> <15514187-d7d0-4650-a058-13ec5684be2c@w5g2000prd.googlegroups.com> <07e98c4f-9b79-412f-9e95-94dd04082355@p39g2000prm.googlegroups.com> <3eb5775f-c7f7-4f92-9154-8f25246b8592@p25g2000hsf.googlegroups.com> <1920377c-755b-43ed-a57b-d2bfeaba1a4a@f36g2000hsa.googlegroups.com> NNTP-Posting-Host: 80.156.44.161 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1208932856 30252 127.0.0.1 (23 Apr 2008 06:40:56 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 23 Apr 2008 06:40:56 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c65g2000hsa.googlegroups.com; posting-host=80.156.44.161; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 webwasher (Webwasher 6.7.0.3295) Xref: g2news1.google.com comp.lang.ada:21047 Date: 2008-04-22T23:40:55-07:00 List-Id: When you declare a type type T is range 1 .. 10; the name T denotes the first subtype of the anonymous type of T (the RM uses T in italics to denote this type, e.g. in 4.5.3, and this type has the infinite set of mathematical integers). Thus 11 *is* a value of the type of T (in sloppy language, the type T). The static named number S: constant :=3D Integer=92Last + Integer=92Last; uses the "+" of Integer without overflow and converts the result to Universal_Integer. Therefore S: constant :=3D Integer=92Last + Long_Integer=92Last; is not allowed because it mixes two different types, but T: constant :=3D Long_Integer=92Last; U: constant :=3D S + T; is allowed, the "+" in the last expression being the one of root_integer.