AnsweredAssumed Answered

Data types ranges and size

Question asked by manuelvr on Sep 15, 2011
Latest reply on Sep 19, 2011 by CraigG

Hi,

 

I have one question regarding data types. I'm using Visual DSP v4.0 for ADSP21364.

The compiler manual says : "On any platform, the basic type int is the native word size. For SHARC processors, it is 32 bits."

Then there is a table where the bit size of each data type is shown. According to that table all data types are 32 bit-long.

My first question is: the bit size is not the range, is it? I mean a variable of type "char" ranges from -127 to 128 (8bits) but its size in memory is 32 bit.

My second question is: which is the range of a variable of type "int"? And a variable of type "long int"? And a variable of type "short"? They are all 32 bit long in memory but not in range, is this right?

 

Thanks

 

imanol

Outcomes