Back To Forum Post
Main Index
Predefined Functions
if or
The
if
statement creates the branches and switches of your Xtscript
[...] = optional ... = your value
if ... or ...
...
[else
...]
endif
Example code
<!--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-->
Show as text
Example output
Reload
at least one of $x or $y is more than 50
$x=36 $y=55
Related pages
if
if and
if not or
if not or not
if elseif
goto
Quick index
assign
comments
concatenation
cookies
debugging tools
del
delete
get
goto
if
if and
if elseif
if not or
if not or not
if or
includes
js in xtscript
print
return
source
user defined functions
var
xt files
xtfunctions in xtscript
xtscripts