Page 1 of 1
Nested comments
Posted: Thu Nov 09, 2006 1:14 pm
by Zoe
I have some code which has nested comments. By this, I mean the following (where block comments are /* */)
/*
/*description*/
code follows here
code follows here
code follows here
code follows here
*/
The way I have it set up at the moment, Zeus thinks that the comment ends at the end of line 2 (after "description") and so all the code following this is not in the format that I've reserved for comments.
So far, all I have done is enter /* in "comment start" and */ in "comment end" under the keyword options tab.
Is this something I just have to live with or is there a way round it?
Thanks
Posted: Thu Nov 09, 2006 9:41 pm
by jussij
The way I have it set up at the moment, Zeus thinks that the comment ends at the end of line 2
Can you tell me which which language are you running
The reason I ask is that for C/C++ the comment does in fact end at line 2 in which case Zeus gets it right
Cheers Jussi
Posted: Fri Nov 10, 2006 9:23 am
by Zoe
Hi,
I use a program called Stata (which is a statistical analysis package) and it's the language used for that.
In this language, the comment defintely ends in the final line
Not to worry, I can live with it.
Posted: Fri Nov 10, 2006 10:30 am
by Zoe
I have just been discussing this with a C++ programmer and he couldn't understand (at first - I did manage to convice him

) why I would want to do what I am doing and why I didn't just change the code to:
/*description*/
/*
code follows here
code follows here
code follows here
code follows here
*/
So that you don't think I'm totally dumb

, the code that I actually have is more like this:
/*
/*description of code*/
code
/*more description of code*/
more code
/*even more description of code*/
even more code
*/
And in total there are many lines of code. I only need to temporarily comment out this code (because the program will run without it and it takes a long time) so I don't want to have to comment out each block of code separately.
Stata understands nested comments (thankfully) but I often lose where comments start and end which is why grey text is useful.
Posted: Sat Nov 11, 2006 2:20 am
by jussij
Not to worry, I can live with it.
It think it should still be possible to add this feature
The only reason I asked the question was more out of curiosity and to also make sure I fully understand the issue involved
Cheers Jussi
Posted: Wed Nov 15, 2006 1:22 pm
by Zoe
Thanks
Would be great if this feature was added.
Posted: Mon Nov 27, 2006 10:05 pm
by jussij
This feature has now been added to Zeus
You can get this feature by downloading the latest Zeus patch found here:
http://www.zeusedit.com/forum/viewtopic.php?t=1000
To enable the feature go to the
Keywords section of the
Document Type and enable the
Nested Comments option.
Cheers Jussi
Posted: Fri Dec 01, 2006 4:51 pm
by Zoe
Wow, thanks. That's fantastic.