up previous next
operators, shortcuts    --    Special characters equivalent to commands


Syntax
A := B         A: variable, B: OBJECT  assignment
A ::= K[...]   A: variable, K: RING    assignment special syntax for rings
A = B    A,B: OBJECT        returns BOOL
A <> B   A,B: OBJECT        returns BOOL
A < B    A,B: OBJECT        returns BOOL
A <= B   A,B: OBJECT        returns BOOL
A > B    A,B: OBJECT        returns BOOL
A >= B   A,B: OBJECT        returns BOOL
A >< B   A,B: LIST        returns LIST
A..B     A,B: INT           returns LIST 
A..B     A,B: RINGELEM (indets)  returns LIST 
[...]                       returns LIST
[..|..]                     returns LIST
I : J    I, J: IDEAL        returns IDEAL
L[N]     L: LIST, N: INT    returns OBJECT
S[N]     S: STRING, N: INT  returns STRING
M[i,j]   M: MAT, i,j: INT   returns RINGELEM
R.F      R: RECORD and F field name      returns OBJECT
R/I      R: RING, I: IDEAL  returns RING
***E***  E: expression      returns OBJECT
?S       S: STRING          prints manual
<< S     S: STRING          [OBSOLESCENT]

Description
A := B; compute B then assign the result to A

A ::= for the special ring syntax (see NewPolyRing )

A = B test whether A and B are equal (see Order Comparison Operators )

A <> B test whether A and B are not equal (see Order Comparison Operators )

A < B test whether A is smaller than B (see Order Comparison Operators )

A >< B equivalent to CartesianProduct(A, B) , CartesianProductList([A,B])

A..B is the Range Operator (see List Constructors )

[...] build a new list (see List Constructors )

[..|..] build a new list (see List Constructors )

I : J equivalent to colon(I, J)

L[N] access N -th entry of list L (indexes start from 1)

S[N] access N -th char of string L (indexes start from 1)

M[i,j] access entry i,j in matrix M

R.F record field selector for field named F of record R

R/I equivalent to NewQuotientRing(R,I)

***E*** interpret E in CoCoA-4 mode

<< S OBSOLESCENT equivalent to source(S)

? string prints the manual page for string , or a list of matching manual pages
See Also