[WML] multi line comments
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
[WML] multi line comments
Hi,
I can't believe that you devs did not include a multi line comment in WML since a good (the only?) way to debug WML is to cut out lots and lots of code. Just to make this clear for everybody; multi line comments could look like this:
I tried to figure out why something like this is not implemented yet and came up with the following possible reasons:
1. You hate multi line comments
2. It's difficult to implement and brings no fame
3. You never ever thought about that (very unlikely)
4. There ARE multi line comments! (if true, i deeply apologize for creating traffic)
If the real reason does not match with one from my list (except number three) and one of you has some time to waste, would you (please) implement these comments?
Great!
Thanks in advance,
200g
I can't believe that you devs did not include a multi line comment in WML since a good (the only?) way to debug WML is to cut out lots and lots of code. Just to make this clear for everybody; multi line comments could look like this:
Code: Select all
/* commented
still commented
see above */
1. You hate multi line comments
2. It's difficult to implement and brings no fame
3. You never ever thought about that (very unlikely)
4. There ARE multi line comments! (if true, i deeply apologize for creating traffic)
If the real reason does not match with one from my list (except number three) and one of you has some time to waste, would you (please) implement these comments?
Great!
Thanks in advance,
200g
Last edited by 200g on April 13th, 2008, 11:16 pm, edited 1 time in total.
If you open your mind too much, your brain will fall out.
Re: /* [WML] multi line comments */
Well AFAIK there is already the possibility to put anything in a dummy tag...
For example something like this :
It's not totally perfect, through
For example something like this :
Code: Select all
[comment]
blah
foobar
[/comment]
"Ooh, man, my mage had a 30% chance to miss, but he still managed to hit! Awesome!" -- xtifr
Re: /* [WML] multi line comments */
or you could use the preprocessor:
#ifdef __UNUSED__
code that doesn't work
comments or something
whatever
#endif
#ifdef __UNUSED__
code that doesn't work
comments or something
whatever
#endif
Re: /* [WML] multi line comments */
Ha yes this is even better
"Ooh, man, my mage had a 30% chance to miss, but he still managed to hit! Awesome!" -- xtifr
Re: /* [WML] multi line comments */
It's hard getting used to the hackish way of WML... so please forgive me that I did not think of #define-comments. It's just... dir(rr)ty. And tags that aren't recognized will not even cause an error or at least a warning? That's too KISSy for my taste
Thanks for your answers.
Thanks for your answers.
If you open your mind too much, your brain will fall out.
- irrevenant
- Moderator Emeritus
- Posts: 3692
- Joined: August 15th, 2005, 7:57 am
- Location: I'm all around you.
Re: [WML] multi line comments
(1) Inbuilt multi-line comments seems like a good suggestion.
(2) You made that suggestion in an unnecessarily antagonistic manner ("I can't believe that you devs did not [...]"). There's no need to question the motives of the Devs in having not already included your brilliant suggestion. It's much more effective to just check whether they have, and if they haven't to say: "Here's my idea. Here's why it's a good idea. It would be awesome if you could implement it, please.".
P.S. "Giving your idea the best chance of being accepted" (link in my .sig) is worth a read.
(2) You made that suggestion in an unnecessarily antagonistic manner ("I can't believe that you devs did not [...]"). There's no need to question the motives of the Devs in having not already included your brilliant suggestion. It's much more effective to just check whether they have, and if they haven't to say: "Here's my idea. Here's why it's a good idea. It would be awesome if you could implement it, please.".
P.S. "Giving your idea the best chance of being accepted" (link in my .sig) is worth a read.
Want to post a Wesnoth idea? Great! Read these:
Frequently Posted Ideas Thread
Giving your idea the best chance of acceptance
Frequently Posted Ideas Thread
Giving your idea the best chance of acceptance
Re: [WML] multi line comments
I apologize if my request seems to be harsh and antagonistic. This was absolutely not my intention.irrevenant wrote:(2) You made that suggestion in an unnecessarily antagonistic manner ("I can't believe that you devs did not [...]"). There's no need to question the motives of the Devs in having not already included your brilliant suggestion. It's much more effective to just check whether they have, and if they haven't to say: "Here's my idea. Here's why it's a good idea. It would be awesome if you could implement it, please.".
EDIT: to make this clear: When I wrote "I can't believe..." that was totally meant in a funny way. It was actually NOT out of respect for the devs who made this amazing game. I don't know if its a case of "lost in translation" or if it's just my special kind of humour. I'd say it's the latter so please don't be mad at me devs. I love you
Last edited by 200g on April 16th, 2008, 10:22 pm, edited 2 times in total.
If you open your mind too much, your brain will fall out.
-
- Posts: 250
- Joined: November 19th, 2007, 7:46 pm
- Location: One among the Fence
Re: [WML] multi line comments
Quite possibly an example of "lost in translation"...the poster is from Germany, after all.200g wrote:I apologize if my request seems to be harsh and antagonistic. This was absolutely not my intention.irrevenant wrote:(2) You made that suggestion in an unnecessarily antagonistic manner ("I can't believe that you devs did not [...]"). There's no need to question the motives of the Devs in having not already included your brilliant suggestion. It's much more effective to just check whether they have, and if they haven't to say: "Here's my idea. Here's why it's a good idea. It would be awesome if you could implement it, please.".
I agree 100% on this. In fact, why not just have the engine parse from "#" to "/"? So you can comment like such...
# Line one of the comment
And it continues down here
And even this far...
Until this line /
Glory in Blood...Needs Programming Help!
If you have time, check out my ongoing serial story...
The Hidden: Secrets of the Future's Past
If you have time, check out my ongoing serial story...
The Hidden: Secrets of the Future's Past
Re: [WML] multi line comments
Because 1) You might want the "/" character in a comment and 2) the "#" character is commonly used as a one-line comment symbol in various languages (I know it serves that purpose in shell scripts, at least) and it would be confusing for WML to appear to follow that convention but actually not.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
Re: [WML] multi line comments
I agree with Turin. Whatever ends the comment should at least have two signs as in C++ to make it less likely that you want to use it in the comment itself.
If you open your mind too much, your brain will fall out.
Re: [WML] multi line comments
Something like
Would be fine, IMO.
Code: Select all
###Multi
Line
Comment###
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
Re: [WML] multi line comments
Or perhaps something like:
Code: Select all
#Single line
\* Multiline *\
'''Multiline'''
Re: [WML] multi line comments
I stay with
Wesnoth's main code is on C++, why not keep the standards?
Code: Select all
/* multi
line
comments
are
cool */
Re: [WML] multi line comments
Because WML != C++; nor in paradigm, nor in syntax.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
-
- Posts: 126
- Joined: April 19th, 2008, 7:12 pm
- Contact:
Re: [WML] multi line comments
I guess there are 3 types of comments which appears in most of languages (there are others but usually they are limited to single language):
- Sh-style comments (perl, php, sh, ruby...)
Code: Select all
# Comment
- C-style comments (c, c++, php, java, ...)
Code: Select all
/* Commant in many lines*/
- C++-style comments (c++, c99, php, java...)
Code: Select all
// Comment