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. |
25th July 2015, 23:08 | #1 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,493
|
Script parsing bug?
I've found some inconsistencies happening with Avisynth 2.6.0 when I accidentally miss out a . between keywords.
I was expecting none of the below to work, since I have omitted a . between the crop and the info, but they all work with inconsistent results: Code:
version.crop(0,0,0,0)info # works as if I had typed .info Code:
return version.crop(0,0,0,0)info # returns version WITHOUT info Code:
q=version.crop(0,0,0,0)info # error: 'I don't know what "info" means' Code:
blankclip q=version.crop(0,0,0,0)info # applies info to the implicit last blankclip, but not to q Last edited by wonkey_monkey; 25th July 2015 at 23:27. |
25th July 2015, 23:52 | #2 | Link | |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
http://avisynth.nl/index.php/Grammar
Quote:
version.crop(0,0,0,0)infois equivalent to Last=version.crop(0,0,0,0) # (1. variable_name = expression)(adding implicit Last and return) and return version.crop(0,0,0,0)infois equivalent to return version.crop(0,0,0,0) # (3. return expression )(Info is simply ignored here) As you guessed, newlines are not required to terminate a statement, which I find makes the code harder to read, but oh well. continuing, q=version.crop(0,0,0,0)info # error: 'I don't know what "info" means'is equivalent to q=version.crop(0,0,0,0) # (1. variable_name = expression)(missing Last argument to Info) (shouldn't the error message be "invalid argument to function Info" then?) and blankclipis equivalent to Last=blankclip # (1. variable_name = expression)((Gavino? What have I missed?)) Last edited by raffriff42; 26th July 2015 at 01:12. |
|
26th July 2015, 09:53 | #3 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
q=version.crop(0,0,0,0)info() would produce "invalid argument ..." On the subject of statement separators, see this thread. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|