快速登录:  

Forum: General Discussion

话题: VDJScript - nesting condition operators

由于该帖子已年深日久,可能包含陈旧过时或描述错误的信息。

doug9474ControlleristMember since 2019

I am trying to figure out how VDJscript works, for one, with regard to nesting conditional operators.

It doesn't look like there are parenthesis in the language to make it clearer, so I'm trying to figure out the order of operations. I would like to know how nested conditional operators work. To copy one example from http://www.virtualdj.com/wiki/VDJScript%20Examples%20Database.html:

var 'double' ? set 'double' 0 & repeat_stop 'myrep' & device_side 'left' ? deck left clone_deck right : deck right clone_deck left : set 'double' 1 & repeat_start 'myrep' 400ms 1 & load & set 'double' 0

Is that to be interpreted as (parenthesis added by me):

var 'double' ? ( set 'double' 0 & repeat_stop 'myrep' & device_side 'left' ? deck left clone_deck right : deck right clone_deck left ) : set 'double' 1 & repeat_start 'myrep' 400ms 1 & load & set 'double' 0

Also, is the value of the conditional operator the value of the side that ends up being executed?

Thanks,
Doug
 

发表时间 Sun 25 Aug 19 @ 8:37 am


(陈旧帖子或论坛版块会自动关闭)