Q-Code User Manual
Ver. 7.0 2021/11/30
142
4.2.41 Switch(Ri) = [Path0, Path1, Path2,... Path15]
Switch command will switch from current path to corresponding path according to the value of Ri. This
path can be a foreground path, a background path, or ”X” (indicating no action). If all the paths in switch
statement are “X”, this switch statement can be skipped. In other words, there is no need of this switch
statement. If values are not defined in switch statement, next command after switch will be executed.
Jump to Path0 if the content of Ri is 0, and jump to Path1 if it is 1, and so on.
Ex.
R0=3, Switch(R0)=[ Path1, Path2, X, Path3], Path4
; R0=3 so jump to Path3.
Ex.
R0=4, Switch(R0)=[ Path1, Path2, X, Path3], Path4
; R0 exceeds the range defined by
switch command, so the next
command will be executed.
4.2.42 Switch(Px) = [Path0, Path1, Path2,… Path15]
Similar to Switch(Ri), this switch command will switch from current path to corresponding path according
to the value of Px. Jump to Path0 if the content of Px is 0, and jump to Path1 if it is 1, and so on.
Ex.
PB =3, Switch(PB)=[Path1, Path2, X, Path3], Path4
; PB = 3 so jump to Path3.
Ex.
PB =4, Switch(PB)=[Path1, Path2, X, Path3], Path4
; PB exceeds the range defined by
switch command, so next command
will be executed.
4.2.43 Switch(RandomL) = [Path0, Path1, Path2,... Path15]
Switch command will switch from current path to corresponding path according to the value of
RandomL This path can be a foreground path, a background path, or the “X” (indicating no action). If
this command is undefined in
[Path]
,
Q-Code
will execute the next command.
Ex.
Switch(RandomL)=[ Path1, Path2, X, Path3], Path4
; According the RandomL value,
switching to the corresponding
path.
4.2.44 Switch(RandomH) = [Path0, Path1, Path2,… Path15]
Switch command will switch from current path to corresponding path according to the value of
RandomH This path can be a foreground path, a background path, or the ”X” (indicating no action). If
this command is undefined in
[Path]
,
Q-Code
will execute the next command.
Ex.
Switch(RandomH)=[ Path1, Path2, X, Path3], Path4
; According to RandomH value,
switch to the corresponding path.