AviSynth Syntax - Boolean functions

Boolean functions return true or false, if the condition that they test holds or not, respectively.

Tests if var is of the bool type. var can be any expression allowed by the AviSynth Syntax.
Examples:
b = false
IsBool(b) = true
IsBool(1 < 2 && 0 == 1) = true
IsBool(123) = false
Tests if var is of the clip type. var can be any expression allowed by the AviSynth Syntax.
Examples:
c = AviSource(...)
IsClip(c) = true
IsClip("c") = false
Tests if var is of the float type. var can be any expression allowed by the AviSynth Syntax.
Examples:
f = Sqrt(2)
IsFloat(f) = true
IsFloat(2) = true   # ints are considered to be floats by this function
IsFloat(true) = false
Tests if var is of the int type. var can be any expression allowed by the AviSynth Syntax.
Examples:
IsInt(2) = true
IsInt(2.1) = false
IsInt(true) = false
Tests if var is of the string type. var can be any expression allowed by the AviSynth Syntax.
Examples:
IsString("test") = true
IsString(2.3) = false
IsString(String(2.3)) = true
Tests if the file specified by filename exists.
Examples:
filename = ...
clp = Exist(filename) ? AviSource(filename) : Assert(false, "file: " + filename + " does not exist")
Tests if var is defined. Can be used inside Script functions to examine the existence of optional arguments.
Examples:
b_arg_supplied = Defined(arg)
myvar = b_arg_supplied ? ... : ...

Back to Internal functions.

$Date: 2008/04/20 19:07:34 $