Support and General Use > Theming and Appearance Customization

two minor comment handling changes

<< < (3/4) > >>

gevaerts:

--- Quote from: Angus_NB on September 09, 2009, 03:37:24 PM ---Some programming languages, Visual Basic, VBA, use the _ character.

--- End quote ---
And what if you want a literal '_' character at the end of a line?

JdGordon:
% works so easily because there is already special handling for it... if you want a % symbol on the wps you have to put %% in the code.... so % by itself is already understood to be special

pixelma:
I just want to point out that the current behaviour of # is there on purpose (I think Llorean was thinking along those lines too).

This way you can add comments on separate lines without adding blank lines - this was needed as long as positioning text was purely line based and still has advantage if you do not position the text using a viewport or want to comment "inside" a viewport. I guess quite a few people will be surprised if their WPS looks differently if you change the behaviour as now every comment line starting with an # would add a blank line.

So a WPS with a code like this:

--- Code: ---%ia
# show next track info below
%Ia

--- End code ---

will then look like this:

--- Code: ---current track's artist

next track's artist
--- End code ---

You can easily avoid the "problem" with inline comment by not using them - I find them harder to read anyways. At the same time the current behaviour of # already offers you a way to break too long lines (without any need for a new marker character) - by using # at the end of your line.

JdGordon:
That code snippet is what I'd like to discourage... the same could (and imo *should*) be done using blank lines... using comment lines makes it harder to read.

The second bit (using # to break lines) is supposedly a bug... I'm open to not fixing that

JdGordon:
ok, after going back and forwards of being confused I've decided the % thing is wrong how I did it.... you shold be using #comment to break those lines....

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version