Quoting "Arnaud S . Launay" <[EMAIL PROTECTED]>, who wrote:
> Le Sun, May 06, 2001 at 03:08:11PM -0500, Tim Legant a écrit:
> [snip]
> > > seems like a problem with \ and # parsing...
> > 
> > Nope, it's working the way it should. Comments are stripped first. This
> > is true of just about every programming / configuration language in the
> > world. I say "just about" because someone will probably point to one
> > that doesn't work this way, but it would be the odd exception.
> 
> Yes, I see what you mean. As I was saying by mail to someone
> else, it's the difference between the logical computer language
> and human thought :)
> 
> Anyway, and just for debate, what do you think of the following:
> 
> # this line is a comment \
> but what is this one ?
> 
> is 2nd line a comment as there is the "\" indicating the "parsing
> continue on next line", or is it not, as everything beyond the #
> will be treated as comment and so not analysed ?
> 
> in the case of mutt, the comment continue til the next blank
> line, but I'm not sure every soft acts in the same way...

No, not till the next blank line. # comments go to the end of line.
A \ before an end-of-line makes it not be an end of line. So, it
goes to the "next" one (that's not escaped). It's the same in C and C++:

[sroberts]$ cat eol.c
int main()
{
  // a comment \
        printf("hello world");
        return 0;
}
[sroberts]$ make eol
cc     eol.c   -o eol
[sroberts]$ ./eol
[sroberts]$ 

-- 
Sam Roberts <[EMAIL PROTECTED]>

Reply via email to