Re: Characters used in programming languages (was: Re: Word, Asian characters, ...)

From: Antoine Leca (
Date: Wed May 09 2001 - 12:30:02 EDT

I agree with what Doug said. However, there is a point where I can nit pick!

Doug Ewell wrote:
> platform's character set support, and you have to backslash-escape one of the
> question marks in a literal string that contains "??" if you don't want any
> surprises.

Well, there is no choice here: you have to backslash-escape any *second*
(the last one if more than two, really) question mark if you do not like surprises.
That is, in the classical example
  char surprise[] = "What ??! you've claimed that ????!";
the correct way is to write
  char surprise[] = "What ?\?! you've claimed that ???\?!";

If instead you write something like
  char surprise[] = "What \??! you've claim that \????!";
then, as trigraph processing preceeds escaping, the ??! will be converted to |
much before the parser will enter the code that deals with strings and
character litterals, so the escape character will try to escape... a bar!


This archive was generated by hypermail 2.1.2 : Fri Jul 06 2001 - 00:18:17 EDT