## `prog::getname` -- the name of an object

#### Introduction

`prog::getname(`object`)` returns the name of the MuPAD object `object`.

#### Call(s)

`prog::getname(object)`

#### Parameters

`object` | - | any MuPAD object

#### Returns

the name as string

#### Related Functions

`op`, `print`, `expr2text`, `text2expr`, `info`

#### Details

- `prog::getname` returns the name of any MuPAD object. The return value is a string, irrespective of the type of the input.
- Names can be extracted from procedures, identifiers, function environments, domains and their methods (and strings, of course). If no name can be extracted from an object, the string `"(noname)"` is returned.
- For all other MuPAD objects the result of `expr2text(object)` is returned as name.

#### Example 1

My own name:

    >> prog::getname(prog::getname)

                                  "prog::getname"

The name of a Domain:

    >> prog::getname(Dom::ExpressionField())

                             "Dom::ExpressionField()"

The ``name'' of an arbitrary MuPAD object:

    >> prog::getname(1)

                                        "1"

    >> prog::getname(a + 2*b)

                                     "a + 2*b"

#### Changes

- new function

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