Page 1 of 1

Binding Reference for Format Expressions $ question

Posted: 02 Feb 2013, 01:45
by nzdreamer55
Hello everyone,

So I am trying to write format expressions for use through the CLI and I am confused by the $ that I see sometimes. I cannot tell when to use it or why. Some examples show things like

{ [$vf]}

See here http://filebot.sourceforge.net/forums/v ... 5&t=2#p783

and then there are other time when there isn't a $

{ac}

See here the last one before Okam posts http://filebot.sourceforge.net/forums/v ... =5&t=2#p51

Could you help me understand when I should use it and when I shouldn't? I cannot figure it out from the examples :-(

Thanks again
-S

Re: Binding Reference for Format Expressions $ question

Posted: 02 Feb 2013, 02:14
by rednoah
Read this:
http://groovy.codehaus.org/Strings+and+GString

e.g. GString expressions

Code: Select all

{"The file $file has ${file.length()} bytes"}
is the same as

Code: Select all

{'The file ' + file + ' has ' + file.length() + ' bytes'}
As you can see $var allows you to build variables and code into String expressions.


PS: This is wrong [$vf]. It's either [vf] (array-definition) or "[$vf]" (string-definition).