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,553a6b79b2471571 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed-east.nntpserver.com!nntpserver.com!statler.nntpserver.com!newsfeed.arcor.de!news.arcor.de!not-for-mail Date: Fri, 21 Jul 2006 10:00:58 +0200 From: Georg Bauhaus Organization: elsewhere User-Agent: Thunderbird 1.5.0.4 (Macintosh/20060530) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How do you bitwise operations in Ada '83 and '95 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> <20060720145730.F9651@docenti.ing.unipi.it> <1153403384.9119.40.camel@localhost.localdomain> <20060721070023.G88718@docenti.ing.unipi.it> In-Reply-To: <20060721070023.G88718@docenti.ing.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <44c0895a$0$24898$9b4e6d93@newsread4.arcor-online.net> NNTP-Posting-Date: 21 Jul 2006 09:59:22 MEST NNTP-Posting-Host: 6fab3573.newsread4.arcor-online.net X-Trace: DXC=8\n:gIf]N`[YFAnNd=0_4T:ejgIfPPldTjW\KbG]kaMXea\9g\;7NmUHk=3ejVXS9o5[N;MJDWR9boY;9DVC] X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:5853 Date: 2006-07-21T09:59:22+02:00 List-Id: Colin Paul Gloster wrote: > On Thu, 20 Jul 2006, Georg Bauhaus wrote: > type Time is new Unsigned_96; > > In fact, > type Time is private; > and then the above." > > No, actually you need a subtype for your example but I accept your point > is still valid. The Time type derived from Unsigned_96 will be a dedicated type with bit fiddling operations. I won't want to assign arbitrary base type values to Time objects? procedure Derived_Type_Instead_Of_Subtype is type Time is new Unsigned_96; V1 : Time; V2 : Time; V3 : Unsigned_96; begin V1 := Shift_Left(7, First_Bit_Year); V2 := V1; -- V3 := V2; -- does not compile, good end; Anyway, I see a razor blade coming close to hair. -- Georg