Functions Index :: C :: CClip
Module:
base :: conversion
Definition:
CClip(val "x", bool "force")
Description:
Converts any variable to a clip type variable. The conversion follows the rules of the table below [1]:
Type of x | Result |
---|---|
clip | x unchanged |
float | x unchanged |
int | BlankClip().SubTitle(String(x)) |
bool | |
string |
Arguments:
"x": The variable to convert.
"force" (Optional, defaults to false): If true and x is an undefined variable (ie Defined(x) returns false) then the function returns BlankClip(). Else the function propagates the undefined variable to the caller, ie it returns an undefined value.
Examples:
f = 4.231
c = AVISource( ... )
s = "a test string"
c1 = CClip(f)
c2 = CClip(c) # c2 == c
c3 = CClip(s)
[1]: Converting between variables of the clip type and other types is a hard to justify action. Nevertheless, this function is provided for reasons of completeness of the type conversion interface. It may be of some use at cases where a quick printout of a variable is wanted, although there are more sofisticated tools for that (see the debug package).