# Are periods used in avisynth scripts substitutes for line breaks?

1. I'm sure this is a stupid question. Is

TFM().TDecimate()

The same as

TFM()
TDecimate()

I see both on here often. I'm assuming you can use a "." instead of a line break? Am I understanding this wrong?  Quote
2. No.
dot basically means that what is before the dot it the first parameter for what comes after the dot.
To make more sense of this you need to be aware of that Avisynth uses an implicit 'last' variable.
(if it was simply a replacement for a new line, something like ...TFM()... should work)

so:
TFM()
<> last = TFM(last)
<> last = last.TFM()

TFM().TDecimate()
<> last = TFM(last)
last = Decimate(last)
<> TFM()
Decimate()

so writing
filter1().filter2().filter3()
is the same as applying
last = filter1(last)
last = filter2(last)
last = filter3(last)
or
filter1()
filter2()
filter3()

Cu Selur  Quote
3. I'm sure this is a stupid question. Is

TFM().TDecimate()

The same as

TFM()
TDecimate()

I see both on here often. I'm assuming you can use a "." instead of a line break?
Yes.  Quote
4. The period pipes the data from the filter on the left to the filter on the right (corrected), without naming it. Otherwise the name "last" is assumed for inputs and outputs. The final result is the same within your simple examples but the mechanism is slightly different. There are cases where there is a difference.  Quote
5. The period pipes the data from the filter on the left to the filter on the left, without naming it. Otherwise the name "last" is assumed for inputs and outputs. The final result is the same within your simple examples but the mechanism is slightly different. There are cases where there is a difference.
Thanks for the explanation! I'm assuming you meant filter on left to filter on right?  Quote
6. Oops. Yes, from the filter on the left to the filter on the right.  Quote
7. Sometimes it's practical to chain functions together with dots, especially when there's more than one video in a script (or the filtering needs to change for some sections). For example:

Code:
```Vid = last

Clip1 = Vid.SomeFilter().AnotherFilter().OneMoreFunction()
Clip2 = Vid.SomeFilter().AnotherFilter(DoThis=false).OneMoreFunction(Something=true)

Clip1.Trim(0,999) + Clip2.Trim(1000,1087) + Clip1.Trim(1088,0)```
And just to be pedantic about your original question, you can still use line breaks when chaining functions with dots if you need to make the script more readable.

Code:
```Vid = last

Clip1 = Vid\
.SomeFilter()\
.AnotherFilter()\
.OneMoreFunction()

Clip2 = Vid\
.SomeFilter()\
.AnotherFilter(DoThis=false)\
.OneMoreFunction(Something=true)

Clip1.Trim(0,999) + Clip2.Trim(1000,1087) + Clip1.Trim(1088,0)```  Quote