You can define variables in your documents, and call them later (within a same page), thus making your document more dynamic.

For example, the following line defines a variable under the name of x1, whose value will be a random integer between -10 and 10 (inclusive):

    \\def{integer x1=random(-10..10)}

This random parameter may then be called by the word \\x1, in the rest of the block defining it. That is, each word \\x1 will be replace by the random value of the variable. This substitution will also take effect within definitions of other variables following it.

\def{integer x1=random(10..50)} \def{integer y1=random(10..50)} \def{integer xy=\x1*\y1} For example, in this page we have defined

    \\def{integer x1=random(10..50)}
    \\def{integer y1=random(10..50)}
    \\def{integer xy=\\x1*\\y1}

Consequently, the text \\x1*\\y1=\\xy gives \x1*\y1=\xy. You may \reload{renew the page} to see the values change.

Some other examples of variables \help{module=adm/doc.en&job=help&help_subject=oefparm} {[Complete list]}

Definition | Effect
--- | ---
\\def{real x=random(-5..5)} | \\x will be a random real number between -5 and 5
\\def{real a=random(-5,-3,0.3,4)} | \\a will be a real number taken randomly among -5,-3,0.3 and 4
\\def{complex z=(1+2*i)^3} | \\z will be the complex number z=\((1+2*i)^3)
\\def{text sign=random(+,-)} | \\sign will be a random sign: + ou -
\\def{integer n=3*exp(\\a)} | \\n will be the closest integer to 3*e\\a (it depends on the value of \\a)
\\def{function f=random (x^2+1,sin(x),log(x))} | \\f will be a random function: either \(x^2+1), or sin(x), or log(x)
\\def{text s=shuffle(6)} | \s will be a list of 6 integers 1,2,...,6, in random order.
\\def{text s=shuffle(a,b,c,d,e)} | \s will be the letters {a,b,c,d,e} in random order.
\\def{real a=evalue(x^2+sin(y),x=3,y=4)} | Evaluation of the function \(x^2+sin(y)), for x=3, y=4
\\def{real r=solve(x^3-3*x+1,x=0..1)} | \\r will the the simple root of \(x^3-3x+1) between 0 and 1
\\def{function h=simplify(x^5*y^3*x^2/y)} | Simplified expression: \(x^7*y^2)
\\def{function g=diff(sin(x)+cos(y),x)} | \\g will the the derivative of sin(x)+cos(y) with respect to x
\\def{function F=int(x^2+3*x+1,x)} | \\F will an antiderivative of \(x^2+3*x+1), the constant term being not garanteed to be always the same \comment{
\\def{function F=int(t^2+3*t+1,t=1..x)} | \\F will the antiderivative of \(x^2+3*x+1) such that F(1)=0}
\\def{real a=int(t^2+3*t+1,t=0..1)} | \a will the numerical integral of \(x^2+3*x+1), from 0 to 1
\\def{text f=htmlmath(2*x^2+3*x)} | \\f will be rendered in html as: \(2x^2+3x)
\\def{text f=texmath(2*x^2+3*x)} | \\f will be the TeX source for the expression.
\\def{matrix m=1,2,3 4,5,6 7,8,9} | \\m will be the matrix of 3 rows and 3 columns.

Conditional parameters: You may write \\def{text ttt=_condition?_def1} or
\\def{text ttt=_condition?_def1:_def2}

In this case, \\ttt will be set to _def1 if _condition is true, or to _def2 otherwise (in the second syntax). \help{module=adm/doc&cmd=new&job=help&help_subject=if}{List of conditions}

Finally, note that inserted blocks via \link{fold}{\fold} or \link{embed}{\embed} inherit the definitions of variables before insertion.