var
Variables can be defined by using assign or var
[...] = optional ... = your value
assign $...=...
var $...=...
Notes
assign and var are interchangeable
Standard Xtscript variables are of the form $name
The examples in this manual all use var ... its shorter.
Example code
<!--parser:xtscript-->
# assign a variable
var $a = 120
print \$a=$a<br />
#a variable from a equation
var $b=($a*42)
print \$b=$b<br />
#a string variable
var $c = some words
print \$c=$c<br />
# a variable from a function
var $d=call mt_rand $min=100; $max=200
print \$d=$d<br />
# multi line pre formatted text variable using double curly brackets
var $f={{
multi line
pre formatted text
assigned to a
variable
}}
print \$f=<pre>$f</pre>
<!--/parser:xtscript-->
Show in textareaExample output
Reload$a=120
$b=5040
$c=some words
$d=133
$f=
multi line
pre formatted text
assigned to a
variable