[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::decc

Title:DECC
Notice:General DEC C discussions
Moderator:TLE::D_SMITHNTE
Created:Fri Nov 13 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2212
Total number of notes:11045

2082.0. "Size of int and long int" by LOCH::SOJDA () Mon Feb 03 1997 16:07

    Can some one confirm for me how long types 'int' and 'long int' are on
    OpenVMS VAX and OpenVMS Alpha with the current release of DEC C?
    
    It seemed to me at one point that both of these were 4 bytes but a
    customer is confused as he has heard different answers.
    
    Thanks in advance,
    
    Larry
    
T.RTitleUserPersonal
Name
DateLines
2082.1ConfirmedWIBBIN::NOYCEPulling weeds, pickin' stonesMon Feb 03 1997 16:106
On OpenVMS VAX and OpenVMS Alpha, "int" and "long int" are
each 4 bytes long.

On Digital UNIX, "long int" is 8 bytes long.

To get an 8-byte integer type on OpenVMS Alpha, use "__int64".
2082.2DECCXL::WIBECANThat's the way it is, in Engineering!Tue Feb 04 1997 09:123
>> To get an 8-byte integer type on OpenVMS Alpha, use "__int64".

Or include "ints.h" and use "int64" and "uint64".
2082.332-bit by default, 64-bit available...XDELTA::HOFFMANSteve, OpenVMS EngineeringTue Feb 04 1997 11:0017
:    Can some one confirm for me how long types 'int' and 'long int' are on
:    OpenVMS VAX and OpenVMS Alpha with the current release of DEC C?

   The same as they always have been -- by default, DEC C uses 32-bit
   (four byte) pointers on both OpenVMS platforms, and 32-bit variables
   for both "int" and "long int" datatypes.
    
:    It seemed to me at one point that both of these were 4 bytes but a
:    customer is confused as he has heard different answers.

   Skim through the Guide to 64-bit Addressing in the V7.0 (and later)
   OpenVMS manual set.
    
   Mechanisms for using longer pointers and longer integers are covered
   in the DEC C documentation...