Top
Back: bigintmat operations
Forward: def declarations
FastBack: bigintmat
FastForward: ideal
Up: Data types
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

4.3 def

Objects may be defined without a specific type: they inherit their type from the first assignment to them. E.g., ideal i=x,y,z; def j=i^2; defines the ideal i^2 with the name j.

Note: Unlike other assignments a ring as an untyped object is not a copy but another reference to the same (possibly unnamed) ring. This means that entries in one of these rings appear also in the other ones. The following defines a ring s which is just another reference (or name) for the basering r. The name basering is an alias for the current ring.

 

This reference to a ring with def is useful if the basering is not local to the procedure (so it cannot be accessed by its name) but one needs a name for it (e.g., for a use with setring or map). setring r; does not work in this case, because r may not be local to the procedure.

4.3.1 def declarations  


Top Back: bigintmat operations Forward: def declarations FastBack: bigintmat FastForward: ideal Up: Data types Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 3-1-6, Dec 2012, generated by texi2html.