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,1cf653444208df72 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-16 12:39:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: ada vs. cpp Date: 16 Oct 2001 15:31:36 -0400 Organization: NASA Goddard Space Flight Center Message-ID: References: <9q7na102nqn@drn.newsguy.com> <3BCBF40A.BBDD4FE6@free.fr> <87669foaf2.fsf@deneb.enyo.de> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1003260806 4249 128.183.220.71 (16 Oct 2001 19:33:26 GMT) X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov NNTP-Posting-Date: 16 Oct 2001 19:33:26 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Xref: archiver1.google.com comp.lang.ada:14739 Date: 2001-10-16T19:33:26+00:00 List-Id: Florian Weimer writes: > lutz@iks-jena.de (Lutz Donnerhacke) writes: > > > :3 When applied to an operand that has type char, unsigned char, or signed > > : char (...) the result is 1. When applied to an operant that hast array > > : type, the result is the total number of bytes in the array. ... > > > > Consequence: No compiler is a conforming one when a char is not a byte?! > > Yes, of course. Unfortunately, this way, a low-level concept (storage > unit) and a high-level one (character set) are strongly linked, which > is a rather bad idea. Actually, a C compiler with a 16 bit char is conforming; this statement in the C standard simply tells you that a size 1 for this compiler means 16 bits. Remember, there is nothing "standard" about an 8 bit byte. In fact, ISO uses the term "octet" to mean 8 bits; "byte" often means "smallest addressable unit", which is commonly 8 bits, often 16 bits, and sometimes some other number. > > Ah I see: C requires (by a footnote) that Storage_Units are > > similar to a char. Yes; in C, a 'char' is the smallest addressable unit of memory. -- -- Stephe