Nếu tuyên bố tạo ra các chi nhánh và các công tắc của Xtscript của bạn
[...] = optional ... = your value
if ... or ...
...
[else
...]
endif
Code ví dụ:
<!--parser:xtscript-->
# 2 random numbers
var $x = call mt_rand $min=1;$max=100
var $y = call mt_rand $min=1;$max=100
# If ... Or ...
# simulates $x < 50 and $y < 50
if $x > 50 or $y > 50
print at least one of \$x or \$y is more than 50 <hr />
else
print Both \$x and \$y are less than 50<hr />
endif
print \$x=$x \$y=$y<br />
<!--/parser:xtscript-->
Code đã chạy;
at least one of $x or $y is more than 50 $x=28 $y=80