## `Pref::warnChanges` -- warnings about changes wrt. the previous version of MuPAD

#### Introduction

`Pref::warnChanges(`TRUE`)` switches on parser warnings about the usage of obsolete features from previous MuPAD versions.

#### Call(s)

`Pref::warnChanges()`
`Pref::warnChanges(TRUE)`
`Pref::warnChanges(FALSE)`
`Pref::warnChanges(NIL)`

#### Returns

the previously defined value

#### Side Effects

Allows or suppresses warning messages.

#### Further Documentation

changes

#### Related Functions

`Pref::warnDeadProcEnv`, `Pref::warnLexProcEnv`

#### Details

- `Pref::warnChanges(``)` returns the current value.
- `Pref::warnChanges(`TRUE`)` switches warning messages on. Now the parser warns if environment variables are declared as local variables (use save instead) or obsolete environment variables are used.
- `Pref::warnChanges(`NIL`)` or `Pref::warnChanges(`FALSE`)` will reset the default value, which is `FALSE`.

#### Example 1

If an environment variable is declared as local variable a warning is given:

    >> Pref::warnChanges(TRUE):
       p := proc() local DIGITS; begin x end:

          Warning: Former environment variable 'DIGITS' used as local [l\
          ine 2, col 25]

Use save instead of local for environment varibles:

    >> p := proc() save DIGITS; begin x end:

    >> Pref::warnChanges(FALSE):

#### Example 2

`ERRORLEVEL` is obsolete:

    >> Pref::warnChanges(TRUE):
       p := proc() begin ERRORLEVEL end:

          Warning: Obselete environment variable 'ERRORLEVEL' used \
          [_check_global]

    >> Pref::warnChanges(FALSE):

#### Changes

- new function

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