Home Online Manual
Top
Back: DBM links
Forward: list declarations
FastBack: link
FastForward: map
Up: Data types
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

4.10 list

Lists are arrays whose elements can be of different types (including ring). If one element belongs to a ring the whole list belongs to that ring. This applies also to the special list #. The expression list() is the empty list.

Note that a list stores the objects itself and not the names. Hence, if L is a list, L[1] for example has no name. A name, say R, can be created for L[1] by def R=L[1];. To store also the name of an object, say r, it can be added to the list with nameof(r);. Rings may be objects of a list.

Note: Unlike other assignments a ring as an element of a list is not a copy but another reference to the same ring.

4.10.1 list declarations  
4.10.2 list expressions  
4.10.3 list operations  
4.10.4 list related functions