Home
RecentChanges

Search:

» AviSynth is a powerful video FrameServer for Win32.

AviSynth Links:
»Download
»Learn to script
»FAQ
»Manual
»Discussion fora
»Project page
»External filters
»FeedBack

» You can add pages to this website immediately. No login required.
Edit this document

» AboutAviSynth

 

Avisynth 
Logo

LogicalOperators

( Diese Seite in flag-germany.gif 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:

+ the same as the function UnalignedSplice
++ the same as the function AlignedSplice

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).

SourceForge Logo

 


Edit this document | View document history
Document last modified Sun, 18 Jul 2004 08:32:48