## `prog::changes` -- generate obsolete functions of MuPAD version 1.4

#### Introduction

`prog::changes(``)` invokes a ``compatibility mode'' between the MuPAD versions 1.4 and 2.0. This call generates ``dummy'' implementations of system functions that existed in version 1.4 but do not exist in 2.0 anymore. Calling one of these obsolete functions produces a warning. The corresponding function of version 2.0 is called automatically by its new name.

`prog::changes(`object`)` prints information on changes of the object.

#### Call(s)

`prog::changes( <option> <, Quiet>)`
`prog::changes(object)`

#### Parameters

`option` | - | either Warning or Error or Remove. The default is Warning.
`object` | - | any MuPAD object

#### Options

`Warning` | - | Calling an obsolete function produces a warning. If a corresponding function exists in version 2.0, it is called automatically by its new name.
`Error` | - | Calling an obsolete function produces an error.
`Remove` | - | Switches the ``compatibility mode'' off. All functions and domains generated by a previous call to `prog::changes` are removed.
`Quiet` | - | No messages are printed during the call to `prog::changes`.

#### Returns

the void object `null()`.

#### Related Functions

`help`, `info`, `Pref::warnChanges`

#### Details

- Many functions and domains that existed in version 1.4 were given new names, or were moved to other places in the library. `prog::changes(``)` generates ``dummy'' versions of all obsolete functions and domains. A subsequent call to such a ``dummy'' function produces a warning informing the user about the nature of the change. Depending on the option Warning or Error used in the call to `prog::changes`, the corresponding function of version 2.0 is called automatically, or an error is produced, respectively. Cf. examples 1 and 2.
- `prog::changes(`object`)` prints information about changes of the object. Such information is available for functions, function environments, domains and environment variables. Cf. example 3.

#### Option: Warning

- When an obsolete function is called, a warning is printed. The corresponding function of version 2.0 is called automatically with the same arguments. If no corresponding function exists in version 2.0, a warning is printed and `FAIL` is returned.
- The calls `prog::changes(``)` and `prog::changes(`Warning`)` are equivalent.

#### Option: Error

- When an obsolete function is called, an error is produced. In particular, no corresponding new function is called. Cf. example 2.

#### Option: Remove

- With this option, all obsolete functions and domains generated by a previous call to `prog::changes` are deleted. Also a call to `reset` deletes the objects generated by `prog::changes`.

#### Option: Quiet

- This option disables the printing of messages while `prog::changes` is executed. The messages produced by calling the obsolete objects are not influenced.

#### Example 1

The MuPAD version 1.4 provides the function `asin` for the inverse sine function. This function has become obsolete in the current version. The same holds for the function `unassign` of version 1.4:

    >> a := asin(1)

                                      asin(1)

    >> unassign(a)

                                 unassign(asin(1))

A call to `prog::changes` is useful to find out information and to execute code written for version 1.4. The following command makes MuPAD produce ``dummy'' versions of all missing functions:

    >> prog::changes()

          Info: Obsolete functions of MuPAD version 1.4 are 'restored'.
                Any call to an obsolete function will produce a warning.
                A function from the present library with the same or a
                similar functionality will be called automatically.

The ``dummy'' functions can be called and produce useful hints. They also forward the arguments to an appropriate new function of version 2.0:

    >> a := asin(1)

          Warning: 'asin' was changed to 'arcsin' [asin]

                                        PI
                                        --
                                        2

    >> unassign(a):

          Warning: 'unassign' was removed. Use the new keyword 'delete' \
          [unassign]

    >> a

                                         a

To remove all obsolete functions, `prog::changes` can be called with the option Remove:

    >> prog::changes(Remove)

          Info: All redefined functions and domains are removed.

#### Example 2

`prog::changes` is called with the option Error. The ``dummy'' functions generated by this call produce error messages. The option Quiet suppresses all messages during the execution of `prog::changes`:

    >> reset():
       prog::changes(Error, Quiet):

    >> a := asin(1)

          Error: 'asin' was changed to 'arcsin' [asin]

    >> READ_PATH

          Error: system variable 'READ_PATH' was renamed, please use 'RE\
          ADPATH'

#### Example 3

`prog::changes` provides information about specific objects:

    >> reset():
       prog::changes(fun)

          Info: 'fun' is removed. [prog::changes]

    >> prog::changes(asin)

          Info: 'asin' is a renamed function.
                'asin' is changed to 'arcsin'. [prog::changes]

    >> prog::changes(sharelib::trace)

          Info: 'sharelib::trace' is a renamed function.
                'sharelib::trace' is changed to 'prog::trace'. [prog::changes]

#### Changes

- new function

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