Top
Back: def
Forward: ideal
FastBack: bigintvec
FastForward: ideal
Up: def
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

4.5.1 def declarations

Syntax:
def name = expression ;

Purpose:
defines an object of the same type as the right-hand side.

Default:
none

Note:
This is useful if the right-hand side may be of variable type as a consequence of a computation (e.g., ideal or module or matrix). It may also be used in procedures to give the basering a name which is local to the procedure.

Example:
 
  def i=2;
  typeof(i);
==> int

See typeof.


Top Back: def Forward: ideal FastBack: bigintvec FastForward: ideal Up: def Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.4.0, 2024, generated by texi2html.