## `anames` -- identifiers that have values or properties

#### Introduction

`anames(`All`)` returns all identifiers that have values.

`anames(`Properties`)` returns all identifiers that have properties.

`anames(`d`)` returns all identifiers that have values from the given domain `d`.

#### Call(s)

`anames(All <, User>)`
`anames(Properties <, User>)`
`anames(d <, User>)`

#### Parameters

`d` | - | a domain

#### Options

`All` | - | get all identifiers that have values
`Properties` | - | get all identifiers that have properties
`User` | - | exclude all system variables

#### Returns

a `set` of identifiers.

#### Related Functions

`:=`, `_assign`, `assume`, `DOM_IDENT`

#### Details

- The result returned by `anames` is a set of unevaluated identifiers. See example 1.
- `anames` does not take into account slots of function environments or domains. Moreover, functions of a MuPAD library are considered only if they are exported.

#### Option: User

- If the option User is given, only those identifiers are returned that have been assigned a value or a property, respectively, by the user.

#### Example 1

`anames(`DOM_IDENT`)` returns all identifiers which have again identifiers as values:

    >> anames(DOM_IDENT)

                          {`*`, `+`, `-`, `/`, `**`, `^`}

The elements of the returned set are unevaluated. You can use `eval` to evaluate them:

    >> map(%, x -> x = eval(x))

          {`*` = _mult, `+` = _plus, `**` = _power, `^` = _power,

             `-` = _negate, `/` = _divide}

#### Example 2

`anames(`All, User`)` returns all user-defined identifiers:

    >> a := b: b := 2: c := {2, 3}:
       anames(All, User)

                                     {a, b, c}

If the first argument is a domain, only identifiers with values from that domain are returned. These may differ from the identifiers whose evaluation belongs to the domain:

    >> a, b;
       anames(DOM_IDENT, User);
       anames(DOM_INT, User)

                                       2, 2

                                        {a}

                                        {b}

#### Example 3

`anames(`Properties`)` returns all identifiers that have been attached properties via `assume`:

    >> assume(x > y): anames(Properties)

                                      {x, y}

#### Changes

- A `domain` now is a valid argument.
- The new option User was introduced.
- `anames(`name`)` is no longer supported; use `bool(name = hold(name))` instead.
- `anames(`0`)` is no longer valid; use `anames(`DOM_FUNC_ENV`)` instead.
- `anames(`1`)` is no longer valid; use `anames(`DOM_PROC`)` instead.
- `anames(`2`)` is no longer valid; use ``anames(`All`)` minus (`anames(`DOM_FUNC_ENV`)` union `anames(`DOM_PROC`)`)` instead.
- `anames(`3`)` is no longer valid; use `anames(`All`)` instead.
- `anames` is now a library function.

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000