### 5.1.103 names

`Syntax:`
  `names ( )`
  `names (` ring_name `)`
  `names (` package_name `)`
  `names (` level `)`
`Type:`
  list of strings
`Purpose:`
  returns the names of all user-defined variables which are ring independent (this includes the names of procedures) or, in the second case, which belong to the given ring. The third case restricts the variables to the given level.

  package_name can be `Current`, `Top` or any other identifier of type package.

`Example:`

        int i=9;
        ring r;
        poly f;
        package p;
        int j; exportto(p,j);
        poly g;
        setring r;
        list l=names();
        l[1..3];
      ==> l p r
        names(r);
      ==> [1]:
      ==>    g
      ==> [2]:
      ==>    f
        names(p);
      ==> [1]:
      ==>    j
        names(0);
      ==> [1]:
      ==>    l
      ==> [2]:
      ==>    p
      ==> [3]:
      ==>    r
      ==> [4]:
      ==>    i
      ==> [5]:
      ==>    create_ring
      ==> [6]:
      ==>    min
      ==> [7]:
      ==>    max
      ==> [8]:
      ==>    datetime
      ==> [9]:
      ==>    weightKB
      ==> [10]:
      ==>    fprintf
      ==> [11]:
      ==>    printf
      ==> [12]:
      ==>    sprintf
      ==> [13]:
      ==>    quotient4
      ==> [14]:
      ==>    quotient5
      ==> [15]:
      ==>    quotient3
      ==> [16]:
      ==>    quotient2
      ==> [17]:
      ==>    quotient1
      ==> [18]:
      ==>    quot
      ==> [19]:
      ==>    res
      ==> [20]:
      ==>    groebner
      ==> [21]:
      ==>    qslimgb
      ==> [22]:
      ==>    hilbRing
      ==> [23]:
      ==>    par2varRing
      ==> [24]:
      ==>    quotientList
      ==> [25]:
      ==>    stdhilb
      ==> [26]:
      ==>    stdfglm
      ==> [27]:
      ==>    Standard
      ==> [28]:
      ==>    Float
      ==> [29]:
      ==>    crossprod
      ==> [30]:
      ==>    ZZ
      ==> [31]:
      ==>    QQ
      ==> [32]:
      ==>    Top

See nameof; reservedName.

User manual for Singular version 4.4.1, 2025, generated by texi2html.