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,c0fb538211c02258 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed-east.nntpserver.com!nntpserver.com!news-west.rr.com!news.rr.com!cyclone.kc.rr.com!cyclone2.kc.rr.com!news2.kc.rr.com!twister.socal.rr.com.POSTED!53ab2750!not-for-mail Sender: kst@nuthaus.mib.org Newsgroups: comp.lang.ada Subject: Re: how to know sizeof(int) References: <5f59677c.0408040658.5976777a@posting.google.com> <87llguk9k1.fsf@insalien.org> From: Keith Thompson Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Sat, 07 Aug 2004 04:09:14 GMT NNTP-Posting-Host: 66.91.245.136 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1091851754 66.91.245.136 (Fri, 06 Aug 2004 21:09:14 PDT) NNTP-Posting-Date: Fri, 06 Aug 2004 21:09:14 PDT Organization: RoadRunner - West Xref: g2news1.google.com comp.lang.ada:2615 Date: 2004-08-07T04:09:14+00:00 List-Id: "Jean-Pierre Rosen" writes: > "Ludovic Brenta" a �crit dans le > message de news:87llguk9k1.fsf@insalien.org... > > Indeed, hidden assumptions are evil, and the Enlightened Ones use > > System.Storage_Unit instead of just "8". Somehow, "8" is too short to > > type and read :) > Sure, but we are in a C context here. Try to explain to a C > programmer that a byte does not necessarily have eight bits :-) To a C programmer, a byte doesn't necessarily have 8 bits. The C standard guarantees that a byte is *at least* 8 bits, but there are systems with larger bytes (I think 32 is typical for DSPs). In C, the number of bits in a byte is determined by the macro CHAR_BIT in . You can't necessarily assume that C's CHAR_BIT is the same as Ada's System.Storage_Unit, but I'd be very surprised to see a system where they're different. -- Keith Thompson (The_Other_Keith) kst-u@mib.org San Diego Supercomputer Center <*> We must do something. This is something. Therefore, we must do this.