[Next][Prev] [_____] [Left] [Up] [Index] [Root]

The print statement

The print-statement allows you to evaluate an expression and see the result as output. It has the syntax

> print EXPRESSION;

If the values of several expressions are required, they may be placed in the one print-statement, separated by commas:

> print EXPRESSION, EXPRESSION, ..., EXPRESSION;

Like all statements, a print-statement must end with a semicolon ( ; ).

Example

> print 60 * 24;
1440

> x := 7;
> print x, 5 * x, x ^ 2;
7 35 49

> print Centre(DihedralGroup(GrpPerm, 8));
Permutation group acting on a set of cardinality 8
Order = 2
    (1, 5)(2, 6)(3, 7)(4, 8)


 [Next][Prev] [_____] [Left] [Up] [Index] [Root]