Nested comments

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
Zoe

Nested comments

Post 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
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post 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
Zoe

Post 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 :lol:


Not to worry, I can live with it.
Zoe

Post 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 :lol: ) 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 :wink: , 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.
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post 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
Zoe

Post by Zoe »

Thanks

Would be great if this feature was added.
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post 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
Zoe

Post by Zoe »

Wow, thanks. That's fantastic.
Post Reply