POV-Ray : Newsgroups : povray.beta-test : Nested comments : Re: Nested comments Server Time
29 Jul 2024 16:21:36 EDT (-0400)
  Re: Nested comments  
From: Warp
Date: 17 Apr 2002 20:41:34
Message: <3cbe163e@news.povray.org>
Slime <noo### [at] hotmailcom> wrote:
> I haven't heard of a language in which that's allowed.

  Now you have: The POV-Ray SDL.

> What *does* annoy me, however, is that the following, which should be
> perfectly fine:

> /* comment /* comment continued */

  What do you mean "should be perfectly fine"? By what definition?
  AFAIK there's no universal rule that says that nested comments must not
be supported by any language.
  By the definition of the POV-Ray SDL, that code is bad because it lacks
a closing comment mark (two comments are opened but only one closed).
  This is the corrected version:

/* comment /* comment continued */ */

> gives an error, saying that the openings and closings of comments don't
> match. I think if nested comments aren't allowed, the program shouldn't
> complain about improper nesting.

  What do you mean "nested comments aren't allowed"? Of course they are
allowed. And they work pretty fine.

  The great thing about nested comments being supported is that if you
have a piece of code with lots of /*...*/ comments and then you want to
comment out the entire piece of code, it works just fine. For example in C
you just can't do it. (Well, in C you can do #if(0) ... #endif, but don't
expect any editor to color that block as a comment.)
  The fact that the Codemax editor does not support coloring of nested
comments is unfortunate, but that doesn't make them unallowed. Coloring
means nothing to POV-Ray.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

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