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=-0.3 required=5.0 tests=BAYES_00,DATE_IN_PAST_03_06 autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,62673a6f294b6ea4 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Received: by 10.204.152.217 with SMTP id h25mr407442bkw.3.1339694015191; Thu, 14 Jun 2012 10:13:35 -0700 (PDT) Path: e27ni48008bkw.0!nntp.google.com!news1.google.com!postnews.google.com!q29g2000vby.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Having problem with SPARK Ada complaining that 'No EXPRESSION can start with reserved word "OTHERS".' Date: Thu, 14 Jun 2012 06:41:41 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 X-Trace: posting.google.com 1339681302 9021 127.0.0.1 (14 Jun 2012 13:41:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 14 Jun 2012 13:41:42 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q29g2000vby.googlegroups.com; posting-host=153.98.68.197; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-Via: ICAP/1.0 192.168.152.6 X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.4) Gecko/20120509 Firefox/10.0.4,gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-06-14T06:41:41-07:00 List-Id: Ben Hocking writes on comp.lang.ada: > =A0 =A0 =A0 SomeQState : Ensemble :=3D (others =3D> Off); [...] > =A0 4:33 =A0 =A0 Syntax Error =A0No EXPRESSION can start with reserved wo= rd "OTHERS". [...] > I know this is valid Ada, because this compiles without issue: > gcc -c -g -gnatQ -gnato -fstack-check -g test.adb AFAICT, this is legal Ada but not legal SPARK. You should rewrite the initialization as: SomeQState : Ensemble :=3D (Z4'First .. Z4'Last =3D> Off); though I'm not sure what the exact rules of SPARK are in this regard. Also, it may be possible and preferable to write Z4'Range =3D> Off instead. -- Ludovic Brenta. The reporting unit should interactively connect the dots; this is why the group facilitates agreed-upon and parallel value creations.