Evaluates a channel (or parameter) and return its value.
float ch(string channel)string ch(string channel)float ch(string channel, float time)string ch(string channel, float time)
Evaluates a channel (or parameter) and return its value. When evaluating string parameters at a specified time, the time value must be the same for all evaluations of the parameter.
If the time is not constant over the all the points/pixels being evaluated, results are not predictable. For example, the following functions will produce unpredictable results:
string s = ch(channel_path, ptnum); // SOP/POP string s = ch(channel_path, cinput(X, Y).r); // COP string s = ch(channel_path, age); // SOP/POP string s = ch(channel_path, V); // CHOPsince the time specified will be different for every evaluation of the VEX function. The following functions will work correctly:
string s = ch(channel_path, Time*.7); // SOP/POP string s = ch(channel_path, XRES); // COP string s = ch(channel_path, SR); // CHOP...because the time specified will be the same for every evaluation of the VEX function. The time specified is in seconds