T
The Real OS/2 Guy
ITYM "not lucky".
No, 'abc' or 'EOF' or 'BAD' is NOT a character. A character is a
single char, not a sequence of chars. A sequence of chars is known a
string, but a string must be in double quotes. So the compiler will
throw a diagnistic.
Quoth n869 (6.4.4.4):
--------
Description
[#2] An integer character constant is a sequence of one or
^^^^^^
more multibyte characters enclosed in single-quotes, as in
^^^^
'x' or 'ab'. A wide character constant is the same, except
prefixed by the letter L. With a few exceptions detailed
later, the elements of the sequence are any members of the
source character set; they are mapped in an implementation-
defined manner to members of the execution character set.
--------
So 'abc' is no less a character constant than 'a'. It may or may not
correspond to an acceptable char value, but it's perfectly acceptable as a
source code construct. (And, just for if you're going to try to nitpick
on the 'may not correspond to an acceptable value', I'll point out that
'a' isn't a "character" either, only a character constant whose value
(of integer type) corresponds to the appropriate character.)
I don't think that the OP uses a multibyte character sert. When he has
an single byte character set then the paragraph above is meaningless.