up previous next
1.4.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 .

Example
/**/  2 + 2;
4
/**/  It + 3;
7
/**/  It;
7
/**/  X := 5;
/**/  It;
7
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.