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,6353697ffeb79d16 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!news.in2p3.fr!in2p3.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Encapsulating Ada.Direct_IO Date: Thu, 18 Nov 2010 12:38:44 -0600 Organization: Jacob Sparre Andersen Message-ID: References: <5ba4147a-6099-4a05-b548-09544f58247a@j18g2000yqd.googlegroups.com> <946c87a9-208a-4206-b925-1c48ac621acd@a37g2000yqi.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1290105525 30191 69.95.181.76 (18 Nov 2010 18:38:45 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 18 Nov 2010 18:38:45 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 Xref: g2news2.google.com comp.lang.ada:16565 Date: 2010-11-18T12:38:44-06:00 List-Id: "AdaMagica" wrote in message news:946c87a9-208a-4206-b925-1c48ac621acd@a37g2000yqi.googlegroups.com... >On 18 Nov., 02:16, "Randy Brukardt" wrote: >> ... For >> instance, the Unisys U2200 (a 36-bit machine, with 9-bit bytes) used >> Character'Size = 9. (It was great fun for the cross-compiler.) > >Huh. How then is Character defined there? Accoriding to RM A.1(35), >Character has 256 positions, so Character'Size should be still 8. >Of course stand-alone objects would have X'Size = 9. > >Note that Natural'Size = Integer'Size - 1. I suppose you are right, but Ada 95 Type'Size has no important meaning. (It's a terrible definition, IMHO.) What matters is what AdaCore calls Type'Object_Size, and that is what I was referring to. (Typically, specifying Type'Size will have some effect on Type'Object_Size, but exactly what that is will vary depending on the target.) You could, I suppose, have packed characters into 8-bits in an array, but the code to access them would have been unspeakably bad. And there would have been no reason to do so anyway, since files and streams are automatically converted when crossing into that machine's domain. Randy.