Q-Code User Manual
Ver. 7.0 2021/11/30
130
4.2 Conditional Jump Command
Condition Jump Command
Px[1 X 0 X]?Path Vol = n?Path
RandomL=data?Path
Switch(Ri) = [Path0, Path1, Path2,..Path15]
Switch(Px) = [Path0, Path1, Path2,..Path15]
Switch(RandomL) = [Path0, Path1,..Path15]
Switch(RandomH) = [Path0, Path1,..Path15]
Switch(Px[d x d x]) = [Path0, Path1, Path2….Path15]
Switch(Xi)=[Path0, Path1, Path2,..Path255]
Switch(Random)=[Path0, Path1,Path2,..Path255]
Syntax:
R op T ? True_Branch { : False_Branch }
R:
RAM or variable.
Op:
Operator, see table below.
T:
R or constant.
?:
Symbol of judgment.
True_Branch { : False_Branch }:
can be the name of path or ASM.
{ }:
false clause inside the curly brackets can be omitted.
Conditional jump instruction is to decide whether to execute True_Branch or False_Branch according to
conditional True or False value. If the False_Branch is neglected and the conditional value is False, it will
jump to the next step of current path.
In addition to using a common path name, the branch path can also be used with a series of instruction
sets that are wrapped in braces. Instruction set will be automatically launched as anonymous path. The
example below on the left and right sides are equivalent.
P1: R0=1? P2, P3
P2: PlayV(ch0, $V0), P4
P3: PlayV(ch0, $V1), P4
P1: R0=1? {PlayV(ch0, $V0) } : {PlayV(ch0, $V1)},
PlayV(ch0, $V2)