Top
Back: 4.7 list
Forward: 4.7.2 list expressions
FastBack: 4. Data types
FastForward: 5. Functions and system variables
Up: 4.7 list
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

4.7.1 list declarations

Syntax:

list name = expression_list;
list name = list_expression;

Purpose:

defines a list (of objects of possibly different types).

Default:

empty list

Example:
 
  list l=1,"str";
  l[1];
→ 1
  l[2];
→ str
  ring r;
  listvar(r);
→ // r                    [0]  *ring
  ideal i = x^2, y^2 + z^3;
  l[3] = i;
  l;
→ [1]:
→    1
→ [2]:
→    str
→ [3]:
→    _[1]=x2
→    _[2]=z3+y2
  listvar(r);     // the list l belongs now to the ring r
→ // r                    [0]  *ring
→ // l                    [0]  list, size: 3
→ // i                    [0]  ideal, 2 generator(s)

Top Back: 4.7 list Forward: 4.7.2 list expressions FastBack: 4. Data types FastForward: 5. Functions and system variables Up: 4.7 list Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.