next up previous contents index
Next: Table References Up: Operands in Expressions Previous: Element or command attributes   Contents   Index


Deferred Expressions and Random Values

Definition of random machine imperfections requires evaluation of expressions containing random functions. These are not evaluated like other expressions before a command begins execution, but sampled as required from the distributions indicated when errors are generated. Such an expression is known as a deferred expression. Its value cannot occur as an operand in another expression.

Example:


ERROR:EALIGN,CLASS=QUADRUPOLE,DX=SIGMA*GAUSS();
All elements in range are assigned independent random displacements sampled from a Gaussian distribution with standard deviation SIGMA. The quantity ERROR->DX must not occur as an operand in another expression.



MAD User Guide, http://wwwslap.cern.ch/mad/