Previous Page Next Page Contents

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

Option: 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




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000