comp.lang.ada
 help / color / mirror / Atom feed
From: "Martin Dowie" <martin.dowie@nospam.baesystems.com>
Subject: Re: Relational Operators
Date: Mon, 29 Oct 2001 10:47:56 -0000
Date: 2001-10-29T10:47:56+00:00	[thread overview]
Message-ID: <3bdd30a0$1@pull.gecm.com> (raw)
In-Reply-To: 9rj4tf$piq$1@st520.dotcom.fr

<tgingold@pc204.ipricot.fr> wrote in message
news:9rj4tf$piq$1@st520.dotcom.fr...
> In article <69eC7.1430$xS6.1903@www.newsranger.com>, Ted Dennison wrote:
> > In article <3BD959E1.6C0AD647@hotmail.com>, Gordon Cooke says...
> >>
> >>Is this code legal?
> >>
> >>procedure Test is
> >>   B : Boolean;
> >>begin
> >>   B := True = True = True;
> >>end Test;
> >
> > Yes. It looks like you found a compiler bug in Gnat. Good job. :-)
> No, this code is not legal:
> according to LRM 4.4:
> relation ::=
>      simple_expression [relational_operator simple_expression]
>    | simple_expression [not] in range
>    | simple_expression [not] in subtype_mark
>
> And LRM 4.5 says:
> relational_operator ::=   =   | /=  | <   | <= | > | >=


Does this tie in with Robert Dewar's point about LRM references in
compiler messages?

e.g.
GNAT
test.adb:4:21: unexpected relational operator

ObjectAda
test.adb: Error: line 4 col 21 LRM:4.4(3), Operand of = cannot be
another relational operation, Inserting parentheses

I know which I found more useful, but perhaps this is just "My Opinion"







  reply	other threads:[~2001-10-29 10:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-26 12:41 Relational Operators Gordon Cooke
2001-10-26 13:57 ` Preben Randhol
2001-10-26 14:42   ` Ted Dennison
2001-10-26 14:10 ` Ted Dennison
2001-10-29  8:44   ` tgingold
2001-10-29 10:47     ` Martin Dowie [this message]
2001-10-29 13:41       ` Pascal Obry
2001-10-29 19:31       ` David Starner
2001-10-30  9:02         ` Martin Dowie
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox