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,9f99a33281d5072c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!m40g2000prc.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: When a conditional expression is static, where can it be used? Date: Wed, 30 Jun 2010 07:39:24 -0700 (PDT) Organization: http://groups.google.com Message-ID: <555e3a37-c709-4b9b-995a-907da862d4b7@m40g2000prc.googlegroups.com> References: <4c2b1ecb$0$7670$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1277908764 25717 127.0.0.1 (30 Jun 2010 14:39:24 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 30 Jun 2010 14:39:24 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m40g2000prc.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:13010 Date: 2010-06-30T07:39:24-07:00 List-Id: On Jun 30, 3:39=A0am, Georg Bauhaus wrote: > A totally meaningless example just to illustrate > the question: =A0What is it that a compiler must report > for the case statement below, if anything? The choice "Sa" is not covered by any alternative. Other than that, I don't think there's anything wrong with the CASE statement, and if you had included a "when others =3D>" alternative I think it would be legal. I'm not sure what potential problem you were trying to illustrate. -- Adam > > procedure CE is > > =A0 =A0type DOW is (Mo, Tu, We, Th, Fr, Sa, So); > > =A0 =A0procedure P is begin null; end P; > > =A0 =A0D: constant DOW :=3D We; > begin > =A0 =A0case D is > =A0 =A0 =A0 when Mo | We | Fr =3D> P; > =A0 =A0 =A0 when (if D =3D We or D =3D Fr then So else Sa) =3D> P; > =A0 =A0 =A0 when Tu | Th =A0=3D> P; > =A0 =A0end case; > end CE; > > Georg