POV-Ray : Newsgroups : povray.windows : recursive comments Server Time
23 Nov 2024 18:58:14 EST (-0500)
  recursive comments (Message 1 to 5 of 5)  
From: SomeOne
Subject: recursive comments
Date: 27 Jun 2004 07:38:21
Message: <40deb1ad@news.povray.org>
I've found that comment-pairs /* and */ can not be applied recursively in the
editor.
When the scene is rendered there is no problem. commented bloCks  are handled
correctly by the compiler/renderer.

Bug or feature?

I'm using Windows XP with POV-ray v3.6.0.icl8.win32

-- 
Maurice


Post a reply to this message

From: Warp
Subject: Re: recursive comments
Date: 27 Jun 2004 09:35:54
Message: <40decd3a@news.povray.org>
SomeOne <ask### [at] yahoocouknospam> wrote:
> Bug or feature?

  A deficiency in the text editor, which is not developed by the pov-team.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: recursive comments
Date: 27 Jun 2004 20:36:53
Message: <40df6825@news.povray.org>
I also noticed that. It's good that you can nest comments in that way although
the editor color-codes them incorrectly.

--
- Nicolas Alvarez
nicoalvar0 [at] hotmail [dot] com



news:40deb1ad@news.povray.org...
> I've found that comment-pairs /* and */ can not be applied recursively in the
> editor.
> When the scene is rendered there is no problem. commented bloCks  are handled
> correctly by the compiler/renderer.
>
> Bug or feature?
>
> I'm using Windows XP with POV-ray v3.6.0.icl8.win32
>
> --
> Maurice
>
>


Post a reply to this message

From:
Subject: Re: recursive comments
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

From: Warp
Subject: Re: recursive comments
Date: 29 Jun 2004 14:24:06
Message: <40e1b3c6@news.povray.org>

> This is a bug in the editor

  No, it isn't.

  A bug is a programming mistake: The programmer wanted to achieve some
effect, but he made a programming mistake and the code doesn't work.

  This is clearly not a bug: It works exactly as the programmer wanted
it to work. It's just that the programmer didn't expect that some
language would use nested /* */ comments and didn't make any code
to handle that.

  It's just a deficiency, not a bug.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

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