% $Id: warnDeprecated.tex,v 1.1.1.3 2004/10/04 17:25:16 nthiery Exp $
\begin{Mhelppage}{warnDeprecated}{N.~Thiéry}
  [ImplState=stable,TestState=stable,DocState=stable]
\Mproofread{nthiery}{09/2004}{proofread}

\begin{MInfo}
  \eng{issue of warnings when deprecated features are used}
\end{MInfo}

\begin{MIntro}
  \eng{\begin{sloppypar}
    \Mthis\ controls whether deprecated functions issue warnings.
       \end{sloppypar}}
\end{MIntro}

\begin{MCalls}
  \Mcall{}
  \Mcall{mode}
\end{MCalls}

\begin{MParameters}
  \param{mode}
     \eng{\Mup{TRUE} or \Mup{FALSE}}
\end{MParameters}

\begin{MReturnValue}
   \eng{the (former) setting of the switch}
\end{MReturnValue}

\begin{MDetails}
  \eng{\begin{sloppypar}
    The \Mex{combinat} library in \mupad~2.5 is a major rewrite
    compared to \mupad~2.0.  Several functions or features known from
    earlier versions are considered deprecated and only forward calls
    to the corresponding new functions. After \Mex{\Mthis(TRUE)} is
    invoked, each such call will issue a warning.
    \end{sloppypar}}

  \eng{\begin{sloppypar}
    \Mex{\Mthis(TRUE)} turns on those warnings, \Mex{\Mthis(FALSE)}
    switches them off, and \Mex{\Mthis()} returns the current setting.
    \end{sloppypar}}
  
  \eng{The warnings are turned on by default when the \mupad-Combinat
    package is explicitly loaded by the user. Otherwise, the default
    setting is initialized from the value of \Mex{Pref::warnChanges()}. }
\end{MDetails}

%\begin{MSideEffects}
%  \eng{Allows or suppresses warning messages about the usage of
%    deprecated features.}
%\end{MSideEffects}

\MRelatedFunctions{Pref::warnChanges}
  
%% \begin{MExample}{ex1}
%%   \eng{The function \Mex{combinat::powerset} is deprecated.  By
%%     default, it simply forwards to
%%     \Mup[combinat,subsets]{combinat::subsets::list}:}
%% \begin{Mexin}
%% combinat::warnDeprecated(FALSE):
%% combinat::powerset({a,b,c})
%% \end{Mexin}
%% \begin{Mexout}
%%     {{}, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}
%% \end{Mexout}

%%   \eng{If you plan to adjust your code to future \mupad\ versions, you
%%     should switch on the warnings about deprecated functions and
%%     change all such calls to their new versions:}
%% \begin{Mexin}
%% combinat::warnDeprecated(TRUE):
%% combinat::powerset({a,b,c})
%% \end{Mexin}
%% \begin{Mexout}
%% Warning: combinat::powerset is obsolete.
%% Please use 'combinat::subsets' and 'combinat::subwords' instea\
%% d. [combinat::powerset]

%%     {{}, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}
%% \end{Mexout}
%% \end{MExample}

%% \begin{MExample}{ex2}
%%   \eng{Here, we show how to temporarily switch on or off the warnings,
%%     and to restore the previous state afterward:}
%% \begin{Mexin}
%% oldval := combinat::warnDeprecated(FALSE):
%% combinat::partitions(4);
%% combinat::warnDeprecated(TRUE):
%% combinat::partitions(4);
%% combinat::warnDeprecated(oldval):
%%   \end{Mexin}
%%   \begin{Mexout}
%%                                5
%% Warning: combinat::partitions(n) is obsolete.
%% Please use 'combinat::partitions::count(n)' instead. [combinat\
%% ::partitions::new]

%%                                5
%%   \end{Mexout}
%% \end{MExample}

\begin{MChanges}
  \version{2.5}
  \new
\end{MChanges}

\end{Mhelppage}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "main"
%%% End: 
