Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
11th June 2007, 12:54 | #22 | Link |
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,183
|
Nested comments is interesting.
But why both nested and not nested?
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick I usually do not provide a technical support in private messages. |
12th June 2007, 03:28 | #24 | Link | ||
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Quote:
Quote:
Now is the time to speak up. Make a proposition and argue your case. |
||
12th June 2007, 08:13 | #25 | Link | |
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,441
|
Quote:
But it's always a pain in the rear end to comment out bigger parts of code that happen to already have a block comment - like they're often used to document functions and the like, after all... A vote for nested comments from me.
__________________
now playing: [artist] - [track] ([album]) |
|
13th June 2007, 20:28 | #26 | Link |
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,183
|
Probably one nested will be enough (if it is not very hard for parser to process complex multi-level scripts).
I tried a new avisynth version a little. Seems, it works fine. Let's comment all! IMO it is the greatest addition to avisynth language for recent years! The previous was KillVideo of course (I can not appraise the mysterious OPT_UseWaveExtensible) |
14th June 2007, 00:06 | #27 | Link |
Registered User
Join Date: Sep 2005
Location: 100011110010001000001 10000011111111000001
Posts: 221
|
I like having both alternatives. They are useful on different occasions. The interaction with strings must be thinked of more though IMHO. The following script:
Code:
[* s = " [* " *] BlankClip().Subtitle("OK") Perhaps string contents should not be examined for starting or terminating comment characters, as they currently do not for single line # comments.
__________________
AVSLib, a free extension library for Avisynth. Current version: 1.1.0 (beta), 14/05/2007. [ Home page | Download page ] |
14th June 2007, 00:55 | #28 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
@gzarkadas,
Yes, sprung! The current code has been thrown together rather quickly to explore the concept. You will also find a comment closing inside a string trips up as well. This is where we need to define some grammar rules with hierachy and how this most usefully will work. |
14th June 2007, 06:39 | #29 | Link |
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,183
|
So, in this beta version we can not use comment symbols in string.
In this case we probably can replace comment block symbols to combination not-permitted in strings (and more long): [""" for comment opening """] for comment closing It is not perfect but more rarely occures. |
20th June 2007, 15:59 | #30 | Link | |
Registered User
Join Date: Mar 2005
Posts: 457
|
Quote:
BTW, i would be very happy if avisynth would implement the C++ /* */ comments. MANY times i've had the situation to comment out many lines, and i had to type # and type... and type... and type... and type... Any news about this? Sorry if i'm late or if it's already developed OPS: I forgot an important, i think the /* */ is the best because some of avs users are programmers, and so it's good to the non programmers to just adapt them to the C++ language in some way eheheh Last edited by 3ngel; 20th June 2007 at 16:01. |
|
20th June 2007, 16:21 | #31 | Link |
Registered User
Join Date: Oct 2001
Location: france
Posts: 521
|
Is // assigned to something currently in avisynth?
Could it be used as an alternative to # single line comments ? esby
__________________
http://esby.free.fr/ |
24th June 2007, 21:29 | #32 | Link |
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,183
|
IMO, adding // will broke compatibility without any real need.
here is my version to try: http://avisynth.org.ru/tmp/avisynth258_comments.zip [" "] nested block comments /""" """/ not nested this way we can use nested comments in complex string (with tripled doublequote) for Eval, subtitle, etc.
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick I usually do not provide a technical support in private messages. |
24th June 2007, 22:14 | #33 | Link | |
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
Quote:
In TextPad, for example, I can select the lines, hit Ctrl+Q,B to enable block-selection mode, then go to Edit > Fill Block. And then to undo it, I could enable block-selection mode, highlight the # characters, and just hit delete. Or as I mentioned a the very beginning of this thread, it's trivial to wrap the relevant lines in a function. |
|
24th June 2007, 23:11 | #35 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Somewhat cumbersome for my taste, since you need to Ctrl+Q,B once more to quit block-selection mode again. I prefer Alt+draggin' (press down Alt before using the mouse button).
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
24th June 2007, 23:57 | #36 | Link | |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
@Fizick, Ahhggggg! You just changed the strings, you didn't fix my code
Parse this Code:
/""" BlankClip() SubTitle("""/ is the "divide" character""") """/ Quote:
This model does not seem to be what people want. We struggle to express clearly how we want the grammar to work. Less coding more deep thinking needed here. |
|
25th June 2007, 11:03 | #38 | Link | |
Registered User
Join Date: Sep 2005
Location: 100011110010001000001 10000011111111000001
Posts: 221
|
Quote:
Thus, IMHO, the tokenizer when searching for a matching closing block comment should skip entirely string literals, with the existing rules (which allow inserting a "" string inside a """ string). Anything else would break the established from the current behavior user expectations.
__________________
AVSLib, a free extension library for Avisynth. Current version: 1.1.0 (beta), 14/05/2007. [ Home page | Download page ] |
|
|
|