logo
Home XtGem- Templates- XtScript- bottom
XtGemmanual

XtScript basics

if and

There is NO if ... and ...
In Xtscripts if statement

Notes

You will have to use other if options to simulate and
See related function links below

Example

<!--parser:xtscript-->
# 2 random numbers
var $x = call mt_rand $min=1;$max=100
var $y = call mt_rand $min=1;$max=100

# If ... and ...

if $x > 0 and $y == 1
  print The<b> and \$y == 1</b> is ignored <hr />
else
  print This never shows <hr />
endif

print \$x=$x \$y=$y<br />

<!--/parser:xtscript-->

Copy as text

Output reload

The and $y == 1 is ignored
$x=91 $y=5

Related

if or if not or if not or not if elseif goto

XtGem manual · all sections

Powered by XtGem
About us Contact Forum top