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: a07f3367d7,caabf5265fad78e5 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsfeed.velia.net!noris.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 30 Jun 2009 00:08:20 +0200 From: Georg Bauhaus Reply-To: rm.tsoh+bauhaus@maps.futureapps.de User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: unsigned type References: <4a48968a$0$31863$9b4e6d93@newsspool3.arcor-online.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <4a493b54$0$31879$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 30 Jun 2009 00:08:20 CEST NNTP-Posting-Host: 6845b14f.newsspool3.arcor-online.net X-Trace: DXC=:Acn5Um;KE5d8Nb@@ZG@b=McF=Q^Z^V384Fo<]lROoR1^YC2XCjHcb9L9LV2A9Oik5A:ho7QcPOV3ed5V2gRG2;6m\[AE5`PSm? X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:6737 Date: 2009-06-30T00:08:20+02:00 List-Id: anon wrote: > As for confusing when the index type is defined as Positive, but the > compiler and runtime system allows zero. That's either a compiler Bug or a > total lack of reading the RM definition of the terms Natural and Positive types > for Adacore and the GNU GCC Ada maintainers. Neither is true, see the hint and reference by J.-P. Rosen in a response to your claim. > About types and standards. GNU GCC does not work for 16 bit machines > unless you can find a code developed back in the 1980s. But 8 and 16 bit > machine are still being use today in special purpose designs. So, code that can > be develope for those machine are still needed. How does the machine affect a type definition such as type N is range 1 .. 10_000_000; If a compiler produces code for an 8bit �Controller then it is still free to support 16bit size integers and 32bit size integers, or Unsigned_N where N /= 8. I see no vagueness here. In fact, for Janus/Ada, where Integer is a 16bit type, the announcement states, "Support for full 16 and 32-bit unsigned types and their operations is included"... Hence, if you relied on standard integer types, you might be running into surprises that could have been avoided by clearly defining your own integer types, whether they start at 0 or not. > But using Unsigned_8, Unsigned_16, Unsigned_32 and Unsigned_64 > which are define in the INTERFACE package are true standard because > Unsigned_8, Unsigned_16, Unsigned_32 and Unsigned_64 do not change rather > you are using a 8 bit machine or a 64 bit machine or anything in between. The type definition type N is range 1 .. 10_000_000; not only does not change, but the objects created will be created by a smart compiler, not by a smart programmer who thinks, it seems, too much about Unsigned_N where it simply does not matter, technically. > And Unsigned type is what the person ask about in the first place. Not everyone agrees.