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
Binding Reference for Format Expressions $ question
-
- Posts: 162
- Joined: 20 Jul 2012, 23:25
Re: Binding Reference for Format Expressions $ question
Read this:
http://groovy.codehaus.org/Strings+and+GString
e.g. GString expressions
is the same as
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).
http://groovy.codehaus.org/Strings+and+GString
e.g. GString expressions
Code: Select all
{"The file $file has ${file.length()} bytes"}
Code: Select all
{'The file ' + file + ' has ' + file.length() + ' bytes'}
PS: This is wrong [$vf]. It's either [vf] (array-definition) or "[$vf]" (string-definition).
Please read the FAQ and How to Request Help.