Top
Back: 3.5.3 Names
Forward: 3.5.5 Type conversion and casting
FastBack: 3. General concepts
FastForward: 4. Data types
Up: 3.5 The SINGULAR language
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

3.5.4 Objects

Every object in SINGULAR has a type and a value. In most cases it has also a name and in some cases an attribute list. The value of an object may be examined simply by printing it with a print command: object;. The type of an object may be determined by means of the typeof function, the attributes by means of the attrib function (typeof, attrib):

 
  ring r=0,x,dp;
  typeof(10);
→ int
  typeof(10000000000000000);
→ number
  typeof(r);
→ ring
  attrib(x);
→ no attributes
  attrib(std(ideal(x)));
→ attr:isSB, type int

Each object of type poly, ideal, vector, module, map, matrix, number, or resolution belongs to a specific ring. Also list, if at least one of the objects contained in the list belongs to a ring. These objects are local to the ring. Their names can be used for other objects in other rings. Objects from one ring can be mapped to another ring using maps or with the commands fetch or imap. See map, fetch, imap.

All other types do not belong to a ring and can be accessed within every ring and across rings. They can be declared even if there is no active basering.


Top Back: 3.5.3 Names Forward: 3.5.5 Type conversion and casting FastBack: 3. General concepts FastForward: 4. Data types Up: 3.5 The SINGULAR language 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.