On Aug 4, 3:39 pm, Barry <dh...@126.com> wrote:
> long and int maybe both 32 bits
maybe differs from certainly are. for long there is no guarantee to be
the same size as int.there is an equal or greater than restriction.And
I am unhappy to see that while there is no standard type for 64bit
ints on x86 family we are using long with the same size as
int(32bits).
char types seem to be of the same size everywhere.
On Aug 4, 3:37 pm, "Bo Persson" <b...@gmb.dk> wrote:
> It's a distinct type. You can overload on it, for example:
>
> void f(char);
> void f(unsigned char);
> void f(signed char);
>
> declares three different functions. This is not true for the other
> integer types, which are always signed, unless you specify unsigned.
>
> On a particular compiler char is either signed or unsigned (or perhaps
> selectable with a compiler option). Whichever it is, other
> requirements make it behave the same as either signed char or unsigned
> char (same value range, same representation), but it is still a
> distinct type.
So,is it just an attempt to be economical in the number of keywords in
order not to declare a type for bytes?
Do they have same size on different platforms or there is no
standard ?
yours,
FM.