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.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,435e65f4acf8bd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-15 17:12:04 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!netnews.com!cpk-news-hub1.bbnplanet.com!news.gtei.net!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Robert Dewar Newsgroups: comp.lang.ada Subject: Re: bitstreams Date: Tue, 16 Jan 2001 00:59:12 GMT Organization: Deja.com Message-ID: <9406cs$g4i$1@nnrp1.deja.com> References: <93se2v$nen$1@eol.dd.chalmers.se> <93vik8$u08$1@nnrp1.deja.com> NNTP-Posting-Host: 205.232.38.14 X-Article-Creation-Date: Tue Jan 16 00:59:12 2001 GMT X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; U) X-Http-Proxy: 1.0 x57.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 X-MyDeja-Info: XMYDJUIDrobert_dewar Xref: supernews.google.com comp.lang.ada:4037 Date: 2001-01-16T00:59:12+00:00 List-Id: In article <93vik8$u08$1@nnrp1.deja.com>, mark_lundquist@my-deja.com wrote: > Note that shift and rotate functions are primitive operations > of the Signed_ and Unsigned_ families of types (RM B.2) ^^^^^^^^^^ A surprising mistake :-) It is of course the case that these functions do NOT apply to signed numbers (where there meaning would be obscure or at least implementation defined, because of the sign bit issue). One interesting bit of non-portability comes from whether it is possible to define these operators for *USER* defined unsigned types. The RM does not require this capability, but in GNAT you can define your own intrinsic shift functions for your own modular types, and GNAT will permit this. I do not know if other Ada 95 compilers provide this capability. Sent via Deja.com http://www.deja.com/