Groovy hepcat Brian Wood jived with All on 21 Jan 98 13:56:51!
multichar constant's a cool scene. Dig it!
BW> I found a quick fix for now, but I'm still curious about why an
BW> expression like '/a' could be evaluated two different ways on the same
BW> machine, using different compilers.
Because it's meaningless. You're confusing "/a" with '\a' and
'/'+'a' and who knows what else!
BW> By fooling around and doing stuff like this...
BW> cout << "Expression /a in hex = " << hex << '/a' << endl;
BW> and checking the output, I've realized that Microsoft v 8.00 is
BW> 'seeing' this two char constant right-to-left, while Borland sees it
What two char constant? That's a FUBAR constant. It has no meaning.
A character enclosed in single quotes (') is a single character.
Characters enclosed in double quotes (") constitute a string.
BW> left-to-right. Adding a case 'a/': fixes the problem for now.
Then try running the program like this, with these command line
args:
myprog /a aaaaa ///// /s /r /q aw ah akjhvfajhv
Now, what was the result?
BW> I suppose the problem is "undefined", "non-portable" solutions
BW> implemented by each vendor on how to handle multi-byte character
BW> constants?? Is there a simple, portable way to do the above?
That's not a multibyte character constant. It's an undefined
something-or-other... or nothing-or-other. This has nothing whatsoever
to do with multibyte characters. What you're trying to do has nothing
to do with them. The problem you're encountering has nothing to do
with them. And your "quick fix" has nothing to do with them. The
problem is you've got multibyte characters confused with strings.
Wolvaen
... "I wonder why uranium is fluorescent," said Marie curiously.
--- Blue Wave/RA v2.20
---------------
* Origin: The Gate, Melbourne Australia, +61-3-9809-5097 33.6k (3:633/159)
|