Top
Back: Return type of procedures
Forward: Miscellaneous oddities
FastBack: System dependent limitations
FastForward: Miscellaneous oddities
Up: Major differences to the C programming language
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

6.3.8 First index is 1

Although the SINGULAR language is C like, the indices of all objects which may have an index start at 1.

 
  ring r;
  ideal i=1,x,z;
  i[2];
==> x
  intvec v=1,2,3;
  v[1];
==> 1
  poly p=x+y+z;
  p[2];
==> y
  vector h=[x+y,x,z];
  h[1];
==> x+y
  h[1][1];
==> x


Top Back: Return type of procedures Forward: Miscellaneous oddities FastBack: System dependent limitations FastForward: Miscellaneous oddities Up: Major differences to the C programming language Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4-0-3, 2016, generated by texi2html.