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,442eb9212004f30 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!wn13feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: Problem using Ada.Text_IO.Modular_IO Reply-To: anon@anon.org (anon) References: <4eab7055-df3d-4d56-87da-8248829da1da@26g2000hsk.googlegroups.com> <32e35e5a-3cae-4fdc-be4a-3ae1e146e9f3@l64g2000hse.googlegroups.com> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Fri, 11 Jul 2008 00:34:30 GMT NNTP-Posting-Host: 12.64.102.42 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1215736470 12.64.102.42 (Fri, 11 Jul 2008 00:34:30 GMT) NNTP-Posting-Date: Fri, 11 Jul 2008 00:34:30 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:1102 Date: 2008-07-11T00:34:30+00:00 List-Id: Why re-invent the Wheel!!! If we spend all day re-stating that which has been done then nothing new get done that day! Just like Wash., which is a place where nothing get done except to find ways to seprate the people from their money, by doing nothing at all. In <32e35e5a-3cae-4fdc-be4a-3ae1e146e9f3@l64g2000hse.googlegroups.com>, Adam Beneschan writes: >On Jul 10, 12:25 am, a...@anon.org (anon) wrote: >> It is easy to use and is tested and verified to work! To name one to >> two reasons! > >Those don't seem like much of a reason. Declaring your own type as >"mod 2**64" seems pretty darn easy. And what exactly do you mean by >Unsigned_64 is "tested"? Unsigned_64 is simply declared as "mod >2**64" (this is specified by the language); so are you saying that >operations on Unsigned_64 have been tested and have found to work >right, but if you declare your own "mod 2**64" you have to do your own >testing to make sure that operations on it work right? I'm having >trouble interpreting your comment in a way that makes any sense. > >Of course, it really doesn't matter which one you use (except, >perhaps, to help prevent incorrect type conversions). The only >differences have to do with readability, pedagogy, and helping make >your programs self-documenting. But ever since Ada was designed, the >position of the Ada community has been that it's better to avoid using >the standard numeric types provided by Ada (Integer, Float) and define >your own that explicitly include the numeric range you need. You seem >to be going in the opposite direction, by recommending that this user >use a standard type provided by the language rather than defining his >own (although the standard type you recommend is certainly better >defined than Integer or Float). > >Another issue is that an implementation doesn't have to provide >Interfaces.Unsigned_64. It should be present on any target processor >whose addressable unit is an 8-bit byte or a 16-, 32-, or 64-bit >word. But I've seen processors in the past that use 6-bit characters >or 36-bit words, and in those cases, using Unsigned_64 instead of "mod >2**64" will turn a portable program into a nonportable one. I'll >grant that such processors are rare these days. > > -- Adam >