快速登录:  

Forum: VirtualDJ Technical Support

话题: storing negative value into a variable

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

NicotuxHome userMember since 2014
how to set a variable to negative value ?
positive value :
"set myvar 1 " sets the var to 1
"set myvar +1 " increments the var

negative value :
"set myvar -1 " decrements the var

of course "set myvar 0 & set myvar -1" sets the var to -1

but side effects when setting from scripts
"set myvar `get_constant -1`" decrements the var
"get_constant -1 & set myvar" does not do what it seems to... stored value is 0 (result for last command run success ?)
"get_constant -1 && set myvar" decrements the var

"get_constant -1 && param_cast absolute && set myvar" finally works
"set myvar `get_constant -1 && param_cast absolute`" finally works
 

发表时间 Sat 03 Oct 20 @ 5:14 pm


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