Singular Manual: Access to elements of a user defined type

| ### 4.24.3 Access to elements of a user defined type Access to elements of a user defined type via `.`: <object>.<element_name>. The <element_names> are from the definition of the type. Additional, all (potentially) ring dependent elements have an additional entry `r_`<element_name> for the corresponding ring. 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
      A.r_b;
    ==> // coefficients: ZZ/32003
    ==> // number of vars : 3
    ==> //        block   1 : ordering dp
    ==> //                  : names    x y z
    ==> //        block   2 : ordering C

User manual for Singular version 4.3.2, 2023, generated by texi2html.