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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,553a6b79b2471571 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.germany.com!news.belwue.de!kanaga.switch.ch!switch.ch!newsserver.news.garr.it!newsserver.cilea.it!docenti.ing.unipi.it!o2943499 From: Colin Paul Gloster Newsgroups: comp.lang.ada Subject: Re: How do you bitwise operations in Ada '83 and '95 Date: Thu, 20 Jul 2006 15:08:45 +0200 Organization: CILEA Message-ID: <20060720145730.F9651@docenti.ing.unipi.it> References: <9315684D-C216-4EDA-8852-0A6BD4C275B0@amado-alves.info> <44bf3301$0$10529$9b4e6d93@newsread4.arcor-online.net> <20060720112346.C65387@docenti.ing.unipi.it> <1153398718.9119.12.camel@localhost.localdomain> Reply-To: Colin Paul Gloster NNTP-Posting-Host: docenti.ing.unipi.it Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: newsserver.cilea.it 1153400925 15809 131.114.28.20 (20 Jul 2006 13:08:45 GMT) X-Complaints-To: news@cilea.it NNTP-Posting-Date: 20 Jul 2006 13:08:45 GMT X-X-Sender: o2943499@docenti.ing.unipi.it In-Reply-To: <1153398718.9119.12.camel@localhost.localdomain> Xref: g2news2.google.com comp.lang.ada:5835 Date: 2006-07-20T13:08:45+00:00 List-Id: On Thu, 20 Jul 2006, Georg Bauhaus wrote: "On Thu, 2006-07-20 at 11:29 +0200, Colin Paul Gloster wrote: > No actual implementation is required to have a datatype for Annex B > identical to a replacement of Interfaces.Unsigned_n in another > implementation. Well, yes, the Unsigned_n types are per implementation. Realistically, how is type Time is mod 2 ** 96; any more portable than Unsigned_96? The definition might express in a better way that there is no dependence on hardware." Being an implementation of a strongly typed language, if an implementation does have Interfaces.Unsigned_96 then the returned value from function Shift_Left (Value : Unsigned_96; Amount : Natural) return Unsigned_96 can not be assigned to a variable of type Time is mod 2 ** 96 without conversion. As another example, suppose one did not have type Time and wanted Interfaces.Unsigned_96 but Interfaces.Unsigned_96 did not exist in one particular implementation but e.g. Interfaces.Unsigned_128 did. The code relying on Interfaces.Unsigned_96 would not work on that implementation. Sure, it is easy to simply change it: but that is unportable.