up previous next
It --
variable containing the last result
|
It is a top-level
system variable containing the last result computed
but not assigned. It is the CoCoA equivalent to
last in GAP.
When CoCoA evaluates a
standalone expression, the result is assigned to
the system variable named
It (and then printed as if in a
println
command). You may use
It in expressions just like any other variable.
/**/ 1+1; -- standalone expression ==> result is saved in "It".
2
/**/ It;
2
/**/ It+1;
3
/**/ It;
3
/**/ X := 17; -- assignment is not a standalone expression, "It" is unchanged
/**/ It;
3
/**/ X+It;
20
|