anames -- identifiers that have
values or properties
Introductionanames(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>)
Parametersd |
- | a domain |
OptionsAll |
- | get all identifiers that have values |
Properties |
- | get all identifiers that have properties |
User |
- | exclude all system variables |
Returnsa set of identifiers.
Related
Functions:=, _assign, assume, DOM_IDENT
Detailsanames 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
Example
1anames(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
2anames(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
3anames(Properties) returns all
identifiers that have been attached properties via assume:
>> assume(x > y): anames(Properties)
{x, y}
domain now is a valid
argument.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.