|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Last 2 lines below are not shown in commented colours. No error
message.
Version 3.5.beta.RC1 win32 (.msvc),
Win98SE, Celeron 500, 160MB.
Alf
/* This is a comment
// This too
/* This also */
#declare Nothing = sqrt(-1);
*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Alf Peake wrote:
>
> Last 2 lines below are not shown in commented colours. No error
> message.
>
> [...]
That's a known problem caused by the codemax editor not supporting nested
comments. This will probably not be changed.
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 16 Apr. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I haven't heard of a language in which that's allowed. Nested comments are
pretty regularly not allowed.
What *does* annoy me, however, is that the following, which should be
perfectly fine:
/* 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.
- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wait, POV-Ray allows nested comments?!?
*tests*
Woah! sweet! all this time I figured they weren't because the color coding
didn't support them! Hah...
Well, I feel silly. Resume your lives.
- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> What *does* annoy me, however, is that the following, which should be
> perfectly fine:
>
> /* 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.
Patient: It hurts when I do this.
Doctor: Stop doing that.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3cbe1353@news.povray.org> , "Slime" <noo### [at] hotmailcom> wrote:
> /* 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.
And how could it then determine if you want a part to be commented out or not?
If you think about what you are suggesting carefully you will find that what
you are expecting is mind-reading :-)
Thorsten
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3cbe163e@news.povray.org...
[snip]
> 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.
This is exactly what I have always done since pov 2 in DOS. I'm new to
WinPov, wanted to play with 3.5 :) and wasn't aware of this codemax
error.
Alf
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> > /* comment /* comment continued */
> And how could it then determine if you want a part to be commented out or
not?
> If you think about what you are suggesting carefully you will find that
what
> you are expecting is mind-reading :-)
Under my assumption that POV-Ray does not support nested comments, which has
been corrected, I would have expected it to behave like languages that
*don't* support nested comments, and simply ignore the second /*, since once
you're in a comment, the only thing that should be responded to is the
closing */.
- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3cbee3b7$1@news.povray.org> , "Slime" <noo### [at] hotmailcom> wrote:
>> > /* comment /* comment continued */
>
>> And how could it then determine if you want a part to be commented out or
> not?
>> If you think about what you are suggesting carefully you will find that
> what
>> you are expecting is mind-reading :-)
>
> Under my assumption that POV-Ray does not support nested comments, which has
> been corrected, I would have expected it to behave like languages that
> *don't* support nested comments, and simply ignore the second /*, since once
> you're in a comment, the only thing that should be responded to is the
> closing */.
Ah, so you had not seen Christoph Hormann's response which already noted that
nested comments are support just not in the editor. It is really hard to
figure out when you responded because of the wrong date in your posts. All
your posts are over six days older...
Thorsten
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |