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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,442eb9212004f30 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!z72g2000hsb.googlegroups.com!not-for-mail From: micronian2@gmail.com Newsgroups: comp.lang.ada Subject: Re: Problem using Ada.Text_IO.Modular_IO Date: Tue, 15 Jul 2008 23:28:28 -0700 (PDT) Organization: http://groups.google.com Message-ID: <71761a97-07c0-4d53-a7f9-562b7ac36c97@z72g2000hsb.googlegroups.com> References: <1215965011.20645.42.camel@K72> <85edeb59-f2aa-465d-9fac-ffd7ba839a5d@s50g2000hsb.googlegroups.com> <487b8c3b$0$7543$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: 71.108.122.117 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1216189708 31361 127.0.0.1 (16 Jul 2008 06:28:28 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 16 Jul 2008 06:28:28 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z72g2000hsb.googlegroups.com; posting-host=71.108.122.117; posting-account=tXrPSAkAAAAFR3M1xqoK7TQdrNxOfPT0 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:1168 Date: 2008-07-15T23:28:28-07:00 List-Id: On Jul 14, 10:26=A0am, Georg Bauhaus wrote: > microni...@gmail.com schrieb: > > > In the context of using types such as Unsigned_N from Interfaces, what > > if you needed the bit shifting operations? > > What if... =A0Do you have some convincing examples? Good point. After reading this, I realized that I usually needed these type of operations to manipulate packed data when I wrote in a language such as C. With Ada I normally can use rep specs and have the compiler generate the necessary bit shifting operations automatically. In addition, with Ada2005 now requiring support for non-default Bit_Order settings, rep specs are even more portable :). Now if only more Ada compilers were supporting Ada2005. GNAT "seems" like the only one that is continuing to make progress these days :(. > > A special algorithm is probably not a convincing example, > even when admirable, or worth millions, because special > algorithms typically require special programming efforts. > For features to be of the "general purpose" flavor though, > i.e. for them to be provided by the language, there should > be a general need, not a nice, special one. Well, there must have been enough compelling reason/need to include the operations for Unsigned_N types in the first place. --Micronian Coder > > -- > Georg Bauhaus > Y A Time Drain =A0http://www.9toX.de