comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Encapsulating Ada.Direct_IO
Date: Thu, 18 Nov 2010 12:38:44 -0600
Date: 2010-11-18T12:38:44-06:00	[thread overview]
Message-ID: <ic3rrl$tff$1@munin.nbi.dk> (raw)
In-Reply-To: 946c87a9-208a-4206-b925-1c48ac621acd@a37g2000yqi.googlegroups.com

"AdaMagica" <christoph.grein@eurocopter.com> wrote in message 
news:946c87a9-208a-4206-b925-1c48ac621acd@a37g2000yqi.googlegroups.com...
>On 18 Nov., 02:16, "Randy Brukardt" <ra...@rrsoftware.com> 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.







  reply	other threads:[~2010-11-18 18:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-17  4:44 Encapsulating Ada.Direct_IO Bryan
2010-11-17  5:20 ` Adam Beneschan
2010-11-26 15:31   ` Bryan
2010-11-17 12:25 ` Peter C. Chapin
2010-11-18  1:16   ` Randy Brukardt
2010-11-18  2:21     ` Peter C. Chapin
2010-11-18 16:36       ` Adam Beneschan
2010-11-18 18:21         ` Peter C. Chapin
2010-11-18 18:36           ` Randy Brukardt
2010-11-18 19:48           ` Adam Beneschan
2010-11-18 20:15             ` Dmitry A. Kazakov
2010-11-18  7:39     ` AdaMagica
2010-11-18 18:38       ` Randy Brukardt [this message]
2010-11-18  9:46     ` Maciej Sobczak
2010-11-18 16:31     ` Adam Beneschan
2010-11-18 17:05       ` Dmitry A. Kazakov
     [not found]         ` <ENidndoH8qoqjHvRnZ2dnUVZ_j-dnZ2d@earthlink.com>
2010-11-19  8:24           ` Dmitry A. Kazakov
2010-11-19 16:19             ` Adam Beneschan
2010-11-18 18:45       ` Randy Brukardt
2010-11-24 21:31     ` Warren
2010-11-17 22:32 ` Yannick Duchêne (Hibou57)
2010-11-17 23:03   ` Adam Beneschan
2010-11-17 23:11     ` Yannick Duchêne (Hibou57)
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox