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-Thread: 103376,c5f68ab74d5099ee X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.213.71 with SMTP id nq7mr12433597pbc.2.1323777616087; Tue, 13 Dec 2011 04:00:16 -0800 (PST) Path: lh20ni17604pbb.0!nntp.google.com!news1.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!87.79.20.101.MISMATCH!newsreader4.netcologne.de!news.netcologne.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Interfaces.Shift_Left Date: Tue, 13 Dec 2011 12:00:15 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <18214312-82f5-45c4-b20d-cb530b500929@h3g2000yqa.googlegroups.com> Mime-Version: 1.0 Injection-Date: Tue, 13 Dec 2011 12:00:15 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="DkTdSjxOCm6DqG+Uf7eArg"; logging-data="1518"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19xX4y2fp7C91t62AHh+Qpti1QyWYpgpNE=" User-Agent: Pan/0.134 (Wait for Me; GIT cb32159 master) Cancel-Lock: sha1:H89PVSzrdM8vSCWyK8IX7sAhbR4= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2011-12-13T12:00:15+00:00 List-Id: On Mon, 12 Dec 2011 14:30:51 -0800, awdorrin wrote: > Perhaps I'm just brain-dead after staring at code all day - but I'm > currently stumped and hoping someone could point me in the right > direction. > > I've been trying to update old Ada code to Ada95 standards and wanted to > replace the calls to a custom C 'bit' library with the methods available > in the Interface package. > > The interface package only takes unsigned values as parameters, which I > figured is fine since at a bit level sign doesn't really matter, but > looks like I was wrong, as I'm now encountering a constraint error after > a Shift_Left operation's results are casted back to an Integer_32 type. Is there any way you could use modular types instead? They are closer to the semantics of C unsigned. - Brian