Previous Page Next Page Contents

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

Option: Warning

Option: Error

Option: Remove

Option: Quiet

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




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000