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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,29f36805b9a20fe8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-02 11:18:29 PST Newsgroups: comp.lang.ada Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!212.74.64.35!colt.net!diablo.netcom.net.uk!netcom.net.uk!newsfeed.online.be!zur.uu.net!ash.uu.net!world!bobduff From: Robert A Duff Subject: Re: Streams in Ada Sender: bobduff@world.std.com (Robert A Duff) Message-ID: Date: Mon, 2 Apr 2001 18:17:41 GMT References: <9aa3dd$efb$1@nh.pace.co.uk> Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.3/Emacs 19.34 Xref: supernews.google.com comp.lang.ada:6369 Date: 2001-04-02T18:17:41+00:00 List-Id: Florian Weimer writes: > Ted Dennison writes: > > > I think you meant, "all possible Ada implementations", which I would > > disagree with. > > Do impossible Ada implementations exist? ;-) No, but some possible Ada implementations don't exist. ;-) > > On the other hand, if we were to interpret this to say "on all > > likely implementations", I could agree with you. I'll leave it up to > > others how likely a conforming Ada95 PDP-10 implementation is. > > I think if you're after practical portability, the PDP-10 doesn't > matter to you. True, but the principle of writing byte-size-independent code is still often a good idea. It's just as easy to be portable to the PDP-10 as to any other machine that has "unusual" Storage_Units. > > Out of curiosity, what exactly constituted a "byte" on a PDP-10? > > According to http://www.inwap.com/pdp10/hbaker/pdp-10/Byte.html, the > smallest individually addressable storage unit is a bit, so with a > common definition of a byte, it consists of a single bit. ;-) Well, sort of. You could address a single bit with a "byte pointer". But a normal machine address addressed a 36-bit word. I believe machine addresses are more efficient. > If I were writing an Ada compiler for the PDP-10, I would probably > choose Storage_Element'Size = 9. Sounds like a bad idea to me. Storage_Element'Size should be 36 on the PDP-10. I believe anything else would be unnecessarily inefficient. >...IIRC, the GCC porters are doing a > similar thing (CHAR_BITS == 8). That's because of various problems with the C language, which don't exist in Ada. C has no packed arrays, for example. Plus the fact that C culture has grown up in such a way that there's a huge amount of code that implicitly assumes that char is 8 bits. In another newsgroup, I recently read a nice quote from G B Shaw that seems apropos: "He is a barbarian who thinks the customs of his tribe are natural laws." - Bob