comp.lang.ada
 help / color / mirror / Atom feed
From: "Jean-Pierre Rosen" <rosen@adalog.fr>
Subject: Re: how to know sizeof(int)
Date: Wed, 4 Aug 2004 17:32:03 +0200
Date: 2004-08-04T17:32:03+02:00	[thread overview]
Message-ID: <pivqec.ppo1.ln@skymaster> (raw)
In-Reply-To: 5f59677c.0408040658.5976777a@posting.google.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 782 bytes --]


"Evangelista Sami" <evangeli@cnam.fr> a �crit dans le message de news:5f59677c.0408040658.5976777a@posting.google.com...
> 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 :-).

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.

-- 
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr





  parent reply	other threads:[~2004-08-04 15:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-04 14:58 how to know sizeof(int) Evangelista Sami
2004-08-04 15:18 ` Eric Jacoboni
2004-08-04 15:26 ` Adrian Knoth
2004-08-04 15:32 ` Jean-Pierre Rosen [this message]
2004-08-04 19:06   ` Ludovic Brenta
2004-08-05  8:14     ` Jean-Pierre Rosen
2004-08-07  4:09       ` Keith Thompson
2004-08-04 21:52   ` Adrian Knoth
2004-08-05  8:16     ` Jean-Pierre Rosen
replies disabled

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