Top
Back: Declaration of objects of a user defined type
Forward: pyobject
FastBack: vector
FastForward: pyobject
Up: User defined types
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

4.21.3 Access to elements of a user defined type


Example:
 
  newstruct("nt","int a,poly b,string c");
  nt A;
  3+A.a;
==> 3
  A.c="example string";
  ring r;
  A.b=poly(1); // assignment: expression must be of the given type
  A;
==> c=example string
==> b=1
==> a=0


Top Back: Declaration of objects of a user defined type Forward: pyobject FastBack: vector FastForward: pyobject Up: User defined types Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 3-1-3, March 2011, generated by texi2html.