next up previous contents index
Next: Speed considerations Up: Expression evaluator Previous: User defined functions   Contents   Index


Objects

The expression evaluator can use the values of the objects defined by the user. This is explained in the end of 6.3. For instance if the object xxx is a 2-dimensional array of real numbers, &xxx(2,5) will be the value of the term [2][5] of the array represented by xxx. It is possible also to use expressions such as &xxx(i,2*i+j), or even something like
&xxx(cos(2*z)+&tt(i,k),exp(u)). If the indices are incorrect, i.e if the integer parts of the indices are negative or bigger that the dimensions of the object, the value of the expression will be zero.

For a complex object, zzz for instance, &zzz(2,5) will be the real part of the value of the term [2][5] of the array represented by zzz. Equivalently, on can use &zzz(2,5).r, and &zzz(2,5).i will give the imaginary part.



2009-11-12