T
those who know me have no need of my name
in comp.lang.c i read:
what are these `immediates' of which you speak? i see constants below.
they are the narrowest sensible type. (char, short and float are not in
this set.)
this isn't a valid hexadecimal constant, you forgot the 0x prefix. given
that as an assumed correction...
it depends on the width of the implementation's int's -- it can be int,
unsigned int, long or unsigned long. i.e., you may think that 32 bit int's
are universal -- they are not; plenty of platforms exist where int is 16 or
64 bits (or other, seemingly stranger values). the most common types today
are unsigned int or unsigned long.
correct.
Which types are immediates by default?
what are these `immediates' of which you speak? i see constants below.
It would be logical if they were of the largest compatible type..
they are the narrowest sensible type. (char, short and float are not in
this set.)
1, int
correct.
FFFFFFFF, unsigned int
this isn't a valid hexadecimal constant, you forgot the 0x prefix. given
that as an assumed correction...
it depends on the width of the implementation's int's -- it can be int,
unsigned int, long or unsigned long. i.e., you may think that 32 bit int's
are universal -- they are not; plenty of platforms exist where int is 16 or
64 bits (or other, seemingly stranger values). the most common types today
are unsigned int or unsigned long.
'a', int
1.2, double
1e300, double
correct.