[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A program variable is thought of a box (a carrier) which can contain Asir objects of various types. The content is called the `value' of that variable. When an expression in a program is to be evaluated, the variable appearing in the expression is first replaced by its value and then the expression is evaluated to some value and stored in the memory. Thus, no program variable appears in objects in the internal form. All the program variables are initialized to the value 0.
[0] X^2+X+1; 1 [1] X=2; 2 [2] X^2+X+1; 7 |
[3] X=x; x [4] X^2+X+1; x^2+x+1 [5] A='Dx'*(x-1)+x*y-y; (y+Dx)*x-y-Dx [6] function foo(x,y); [7] B=foo(x,y)*x^2-1; foo(x,y)*x^2-1 |