POV-Ray : Newsgroups : povray.general : using comments: a visual problem in the editor window : using comments: a visual problem in the editor window Server Time
25 Apr 2024 17:26:00 EDT (-0400)
  using comments: a visual problem in the editor window  
From: Kenneth
Date: 30 Nov 2017 07:45:00
Message: <web.5a1ffb6a92f74a1989df8d30@news.povray.org>
This is something I noticed years ago, but I never took the time to figure out a
reproducible example until now.

In Windows at least, POV-Ray's multiple-line comment indicators show a purely
visual problem in the editor window, when they are nested: Some of the
'contained' text looks to be commented-out, but some doesn't (although
apparently this doesn't affect the rendering of a scene, even though the scene's
text 'looks' like there's a syntax mistake somewhere.) This assumes that you've
set up POV-Ray to show different colors for different kinds of SDL text entries,
like I have. (For example, all comments in a particular exclusive color.)

Here's a short example scene. Just copy and SAVE this as a scene file, and
notice the apparent 'non'commented-out lines (which should show up as
differently-colored text.) Is this expected behavior? It gives a false
impression that something's 'not correct.' (In the past, I used to spend hours
looking through complex scenes to find what I thought was a coding error I may
have made-- before even attempting to render the scene-- until I realized that
it was these nested comments that were to blame.)

-------
#version 3.7;

global_settings{assumed_gamma 1.0 max_trace_level 5}

/*
#declare A = 0;
#declare B = 1;
#declare C = 2;
#declare D = 3;


/*
blah blah blah
blah blah blah
blah blah blah
*/


#declare E = 4;
#declare F = 5;
#declare G = 6;
*/

// Another example: The following is from the in-built documentation
// at 3.3.1.4 Comments...

// ...comments can be nested, the following is legal:
/* This is a comment
// This too
/* This also */
*/


Post a reply to this message

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