up previous next
1.5.1 Evaluation
An expression is by itself a valid command. The effect of this command is that the expression is evaluated in the current ring and its value is displayed.

The evaluation of an expression in CoCoA is normally performed in a full recursive evaluation mode. Usually the result is the fully evaluated expression.

The result of the evaluation is automatically stored in the variable It .

/**/  2 + 2;
/**/  It + 3;
/**/  It;
/**/  X := 5;
/**/  It;
The command X := 5 is an assignment, not an evaluation; so it does not change the value of the variable It .

If an error occurs during the evaluation of an expression, then the evaluation is interrupted and the user is notified about the error.