M
Martin Dickopp
How would you propose to display the *value* of any variable ?
Not:
unsigned int i = 42; printf("%u\n%x\n", i, i);
The squiggles '4' '2' juxtaposed are a representation. "%u" means to
present the value in base-10 form. "%x" means to present it in base-16
form. You cannot say that one of the two things printed here is
"the value" and the other is merely "the representation". You cannot
say that they are both "the value", because they are different.
The terms "value" and "representation" (of types, which is obviously
what Dan meant) have well-defined meanings in C. If a program displays
the glyph associated with the character '4' followed by the glyph for
'2', it is displaying the *value* of `i'.
The short (and most likely not very accurate) definition of
"representation" is what you get when you access an object through a
pointer to `unsigned char'. For a full description, read section 6.2.6
of the standard.
Martin