multiline comments
Roel Schroeven
rschroev_nospam_ml at fastmail.fm
Wed Apr 19 05:16:37 EDT 2006
Duncan Booth schreef:
> Would you care to name a few languages which support nested block
> comments? There really aren't many: ML as you mentioned; Standard Pascal
> doesn't permit nesting of comments but *some* implementations do allow it.
>
> Want to comment out a block of code in C++? The only (nearly) reliable way
> is to insert single-line comments down the block. You can't use a block
> comment if there are any other block comments inside the code you want to
> block out.
Depends, some compilers support that. But the preferred way, which works
very well, is to use preprocessor directives:
#if 0
...
#endif
Works in both C and C++.
--
If I have been able to see further, it was only because I stood
on the shoulders of giants. -- Isaac Newton
Roel Schroeven
More information about the Python-list
mailing list