On Tue, Aug 26, 2008 at 10:26:31AM +0200, Werner Smekal wrote:
> >
> Hi,
> 
> >
> > Finally, a dumb question. Is there any chance that floats, ints,
> > doubles, etc. in C or Floats, Integers, Long_Floats, or Long_Integers
> > in Ada have different sizes between languages on 64-bit boxes than on
> > 32-bit boxes?
> 
> float should always be 32bit, double always be 64bit in C. The type  
> int is dependent on the machine you are using, so it can be 16bit,  
> 32bit, 64bit. Very likely that on 64bit machines int is 64bit (but  
> must not be). See e.g. 
> http://en.wikipedia.org/wiki/C_variable_types_and_declarations 

The C spec says that a long is at least as big as an int. Int must be at
least 16 bits, and long at least 32 bits. long long (where implemented)
must be at least 64 bits. 32 bit linux systems with gcc have int and
long both as 32 bit. 64-bit linux gcc systems usually have int as 32 bit 
and long as 64 bit. The (usual) problem when porting C programs from 
32 -> 64 bit is that the size of long differs.

Andrew

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to