comp.lang.ada
 help / color / mirror / Atom feed
From: tgingold@pc204.ipricot.fr
Subject: Re: Relational Operators
Date: 29 Oct 2001 08:44:31 GMT
Date: 2001-10-29T08:44:31+00:00	[thread overview]
Message-ID: <9rj4tf$piq$1@st520.dotcom.fr> (raw)
In-Reply-To: 69eC7.1430$xS6.1903@www.newsranger.com

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 ::=   =   | /=  | <   | <= | > | >=

Therefore, A = B = C is not legal.

Tristan.



  reply	other threads:[~2001-10-29  8:44 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 [this message]
2001-10-29 10:47     ` Martin Dowie
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