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,UTF8 Path: g2news1.google.com!news1.google.com!news.glorb.com!newsgate.cistron.nl!transit.news.xs4all.nl!195.241.76.212.MISMATCH!tiscali!transit1.news.tiscali.nl!dreader2.news.tiscali.nl!not-for-mail Newsgroups: comp.lang.ada Subject: Re: how to know sizeof(int) References: <5f59677c.0408040658.5976777a@posting.google.com> From: Ludovic Brenta Date: Wed, 04 Aug 2004 21:06:06 +0200 Message-ID: <87llguk9k1.fsf@insalien.org> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:+N7FgGPAAecvgEBGR1htzGmKaf0= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Organization: Tiscali bv NNTP-Posting-Date: 04 Aug 2004 21:06:02 CEST NNTP-Posting-Host: 83.134.241.76 X-Trace: 1091646362 dreader2.news.tiscali.nl 62354 83.134.241.76:35296 X-Complaints-To: abuse@tiscali.nl Xref: g2news1.google.com comp.lang.ada:2551 Date: 2004-08-04T21:06:02+02:00 List-Id: "Jean-Pierre Rosen" writes: > "Evangelista Sami" a écrit dans le message de hello >> >> how can i know the result of a sizeof(int) (in C). >> i did not find the approppriate stuffs in interfaces.C. >> > Interfaces.C.Int'Size/8 > > Interfaces.C.Int is the same as C Int, but the Size attributes is in > bits, not bytes (OK, I assume here that a byte is 8 bits :-). 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 :) > Note that sizeof is *not* a regular function (a regular function > could not have a type as the parameter). It is handled very > specially in the C compiler, therefore there is no way you could get > to it from another language. I suppose 'Size is also handled specially by Ada compilers, right? -- Ludovic Brenta.