up previous next
1.5.2 Assignment
An assignment command has the form
  L := E
where L is a variable and E is an expression. The assignment command binds the result of the evaluation of the expression E to L in the working memory.

Example
/**/  use R ::= QQ[t,x,y,z];
/**/  I := ideal(x,y);

/**/  M := 5;  N := 8;
/**/  T := M+N;
/**/  T;
13
/**/  T := T+1;  -- note that T occurs on the right, also
/**/  T;
14

/**/  L := [1,2,3];
/**/  L[2] := L[3];
/**/  L;
[1, 3, 3]

/**/  P := record[F := x*z];
/**/  P.Degree := Deg(P.F);
/**/  P;
record[Degree := 2, F := x*z]