How do I block comment?
by Chris Dillman · in Torque Game Builder · 05/31/2005 (12:51 am) · 17 replies
Ok this is dumb but how do I block comment scripts?
like in C
/*
BLAH BLAH BLAH
*/
like in C
/*
BLAH BLAH BLAH
*/
#2
Thats insane...
Its like 10 lines of parser code by hand to add comments.
Why on earth would some design a scripting engine with out block comments
or some kind???
05/31/2005 (8:55 am)
Thanks :)Thats insane...
Its like 10 lines of parser code by hand to add comments.
Why on earth would some design a scripting engine with out block comments
or some kind???
#3
If TGE does, then maybe something got missed out of T2D that needs putting back in.
05/31/2005 (9:19 am)
Does TGE support block comments? If not, then I suspect that's why T2D doesn't.If TGE does, then maybe something got missed out of T2D that needs putting back in.
#4
05/31/2005 (9:41 am)
TGE does not support block comments, but from what I "heard" a while ago in Ben Garney's old plan he mentioned adding this and many other features to the TorqueScript language in TGE 1.4, which will then be brought to T2D's base
#5
- Melv.
05/31/2005 (12:11 pm)
I use JEdit which allows blocks to be comment in/out in a click which I find even easier than doing the /* */ combo.- Melv.
#7
Im going to see if I can get BBEdit to do it for me.
Otherwise I was thinking of adding it to the language...
But when is 1.4 due?
And Im really surprised its taken this many years to get it in there...Seeing that Lex and Yacc
are used to make the languag in the first place... for the person who wrote it this would have been
trivial...
I can't figure out why it was ever left out.
05/31/2005 (7:08 pm)
Ian... very creative...Im going to see if I can get BBEdit to do it for me.
Otherwise I was thinking of adding it to the language...
But when is 1.4 due?
And Im really surprised its taken this many years to get it in there...Seeing that Lex and Yacc
are used to make the languag in the first place... for the person who wrote it this would have been
trivial...
I can't figure out why it was ever left out.
#8
05/31/2005 (7:29 pm)
I think because a lot of people prefer to do what Melv suggested, by using an editors comment function that places/removes comments in front of each line in a selected group. I've found I prefer this method in C++ often too, much easier to go in and uncomment a single line if needed then.
#9
05/31/2005 (7:45 pm)
Yeah, I really just copy the same comment block over and over again, so I don't notice xP.
#10
Nice to have a choice.
- Melv.
06/01/2005 (12:44 am)
I'll go and check with Ben to see if this is planned for a future version, maybe even v1.4 of TGE though.Nice to have a choice.
- Melv.
#11
I think the rationale is that most IDEs and editors would allow you to mark a block of code and click somewhere to comment it, and as such, commenting several lines of code isn't that tiresome.
06/01/2005 (1:01 am)
Some computer scientists believe that block-quotes are prone to generate errors and should be kept out of a computer programming language, in favor of the one-line quote. Ada, which is the epitome of not-letting-you-make-an-error design allows only one-line quotes.I think the rationale is that most IDEs and editors would allow you to mark a block of code and click somewhere to comment it, and as such, commenting several lines of code isn't that tiresome.
#12
Also feel it is like a lot of things coms profs come up with it really not practicle out in real world
situations.
in my own situation I have ripped all the T2D scipts appart in order to set up a clean script shell.
What this means is I have coded up a tone of code pages and pages that does not work yet.
in order to debug it I need to easily be able to comment out large sections and uncomment them as they work.
Commenting 5 pages of code by hand with out and IDE to do it is a real pain in the ass :)
06/09/2005 (1:30 pm)
Hans that is a good point.Also feel it is like a lot of things coms profs come up with it really not practicle out in real world
situations.
in my own situation I have ripped all the T2D scipts appart in order to set up a clean script shell.
What this means is I have coded up a tone of code pages and pages that does not work yet.
in order to debug it I need to easily be able to comment out large sections and uncomment them as they work.
Commenting 5 pages of code by hand with out and IDE to do it is a real pain in the ass :)
#13
09/16/2007 (2:03 pm)
Well, without an IDE is somewhat a personal decision. I didn't believe Torsion to be worth the $40, so I'm using Codeweaver (free) and it allows me to comment multiple lines quite easily.
#14
09/16/2007 (7:45 pm)
I'm pretty sure this is in the language itself, and has been for awhile. I'm not using Codeweaver or Torsion and I use block comments extensively.
#15
09/17/2007 (11:32 am)
Jason and Joe, this is a really old thread. Block quotes in scripting have been working for a while now.
#16
09/17/2007 (1:58 pm)
Did somebody erase a post? It was on the top of my list this morning.
#17
you can try to do this
select all lines you want to comments and now press <Ctrl> key and press "k" key from keyboard and here it is...
Cheers...
02/27/2012 (1:47 am)
Hi Chris,you can try to do this
select all lines you want to comments and now press <Ctrl> key and press "k" key from keyboard and here it is...
Cheers...
Torque Owner Philip Mansfield
Default Studio Name
You're going to have to put a // on each line.