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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,eda443e5aaf028c4 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Suprise of comparison result Date: 1999/10/18 Message-ID: <7udvm8$nnv$1@nnrp1.deja.com>#1/1 X-Deja-AN: 537271414 References: <37fd7e17.0@news.pacifier.com> X-Http-Proxy: 1.0 x23.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Oct 18 02:12:29 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-10-18T00:00:00+00:00 List-Id: In article <37fd7e17.0@news.pacifier.com>, "Steve Doiel" wrote: > I'm suprised that Ada behaves this way. Both ObjectAda and > GNAT give the same result. That's because it is the well defined result of what was written. You can always be surprised when you use a construct you do not understand, in this case the problem is not knowing the meaning of unary minus on modular types. > If I were programming in C I would not be suprised at this > result. But in Ada? Well I guess that's because you understand in C the nature of unsigned modular types. Well the semantics of modular types are pretty much identical in C and Ada, so the behavior will indeed be similar! Sent via Deja.com http://www.deja.com/ Before you buy.