help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: warning_ids


From: Przemek Klosowski
Subject: Re: warning_ids
Date: Tue, 18 Sep 2007 14:19:17 -0400 (EDT)

Maybe you could just use the function PS1 everywhere, and define a
compatibility version for old octave versions? THe following function
also tries to save/restore the warning if it is implemented.

   if (exist ("OCTAVE_VERSION") != 5)
     function PS1(x)
       if (!isstr(warning("query"))
         old=warning("query","Octave:built-in-variable-assignment").state;
       endif
       PS1 = x;
       if (!isstr(warning("query"))
         warning(old,"Octave:built-in-variable-assignment");
       endif
     endfunction
   endif



reply via email to

[Prev in Thread] Current Thread [Next in Thread]