( Diese Seite in Deutsch )
For all types of operands (clip, int, float, string, bool) you can use:
== | is equal |
!= | not equal |
<> | not equal (alternative to !=, v2.07) |
|| | or |
&& | and |
For numeric types (int, float):
+ | add |
- | subtract |
* | multiply |
/ | divide |
% | mod |
>= | greater or equal than |
<= | less or equal than |
< | less than |
> | greater than |
AviSynth in former versions parsed expressions from right to left, which gave unexpected results:
a = 10 - 5 - 5 resulted in 10 - (5 - 5) = 10 instead of (10 - 5) - 5 = 0 !
b = 100. / 2. / 4. resulted in 100. / (2. / 4.) = 200 instead of (100. / 2.) / 4. = 12.5 !
These "bugs" have been corrected in v2.53!
For string type:
+ | add |
>= | greater or equal than (v2.07) |
<= | less or equal than (v2.07) |
< | less than (v2.07) |
> | greater than (v2.07) |
For clip type:
For bool type:
?: | execute code conditionally |
b = (a==true) ? 1 : 2
This means in pseudo-basic:
if (a=true) then b=1 else b=2
v2.07 provides a nop() function in cases where "else" may not otherwise be desirable (such as a conditional import or loadplugin).