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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3dfe18b59c34a51c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-26 06:57:17 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!uninett.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: Relational Operators Date: Fri, 26 Oct 2001 13:57:17 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: <3BD959E1.6C0AD647@hotmail.com> NNTP-Posting-Host: kiuk0156.chembio.ntnu.no X-Trace: tyfon.itea.ntnu.no 1004104637 24398 129.241.83.82 (26 Oct 2001 13:57:17 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Fri, 26 Oct 2001 13:57:17 +0000 (UTC) User-Agent: slrn/0.9.7.2 (Linux) Xref: archiver1.google.com comp.lang.ada:15239 Date: 2001-10-26T13:57:17+00:00 List-Id: On Fri, 26 Oct 2001 13:41:05 +0100, Gordon Cooke wrote: > Is this code legal? > > procedure Test is > B : Boolean; > begin > B := True = True = True; > end Test; Consider: B := True = 5 = 5; If you write it as: B := (True = 5) = 5; you will get at compile time: tests.adb:6:16: invalid operand types for operator "=" tests.adb:6:16: left operand has type universal integer tests.adb:6:16: right operand has type "Standard.Boolean" but change it to: B := True = (5 = 5); and it will be legal. Preben