POV-Ray : Newsgroups : povray.windows : recursive comments : Re: recursive comments Server Time
28 Sep 2024 18:11:22 EDT (-0400)
  Re: recursive comments  
From:
Date: 29 Jun 2004 06:35:30
Message: <40e145f2$1@news.povray.org>
This is a bug in the editor -- with usable side-effects:

/*
These
lines
are
a
comment
// */

//*
But
not
these
lines
// */

I.e. adding/removing a single slash can switch off/on
a large block of code (a nice trick published some
time ago on one of these newsgroups; dont't know
anymore by whom).

A two-level nesting of comments is possible by
using both types of comments; this works:

/*
comment
// comment
comment
*/

// comment
// /* comment
// comment
// comment */
// comment

Prefixing many lines by "//" is easy in the windows
version: click on the beginning of the first line to
become a comment, then shift-alt-click on the
beginning of the last line to become a comment.
This gives a long vertical cursor. Then type "//"
(without the apostrophes) -- that's all.
Or get this long vertical cursor by alt-dragging
from the beginning of the first to the last line.

And of course "//"-comments can be nested
without limitation:

// comment
// comment // comment
// // comment
//// comment
// comment

   Sputnik


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.