> > Basically, #"; isn't lexically correct as a preprocessing directive.
> > The comments business is interesting - I assume that's where the "no
[quoted text clipped - 17 lines]
> block unless it is the #endif directive which would really minimize the
> chance that such things happen.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
>> Iam sure there are more situations where similar things might happen.
>> imho
[quoted text clipped - 5 lines]
> Except it also has to look for #if so that it can match the right
> number of levels of #endif.
Which it also has to do at the moment, otherwise the following wouldn't
compile:
#if false
#if false
#endif
#endif
> #if isn't meant to be a way of commenting out code - do that with
> multi-line comments, or get the IDE to add // at the start of each line
[quoted text clipped - 3 lines]
> So, to me it sounds like changing your behaviour in this case would be
> a better answer than changing the spec to suit this particular case.
I was conditionally compiling my code to that I have unfinished code only in
DEBUG mode.
Jon Skeet [C# MVP] - 31 Mar 2006 17:32 GMT
> >> Iam sure there are more situations where similar things might happen.
> >> imho
[quoted text clipped - 13 lines]
> #endif
> #endif
That's my point - it has to validate *some* preprocessor directives, so
I don't see that it's a big problem to have to validate all
preprocessor directives.
> > #if isn't meant to be a way of commenting out code - do that with
> > multi-line comments, or get the IDE to add // at the start of each line
[quoted text clipped - 6 lines]
> I was conditionally compiling my code to that I have unfinished code only in
> DEBUG mode.
But the code you "conditioned" out was invalid - if it had been valid
code, it would have been okay. The only exception to that is the
comment with the preprocessor directive in it - it would be reasonable
to expect that to work.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too