octave-maintainers
[Top][All Lists]
Advanced

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

Re: improved compatibility


From: John W. Eaton
Subject: Re: improved compatibility
Date: Wed, 9 Jul 2003 17:15:53 -0500

On  9-Jul-2003, Andy Adler <address@hidden> wrote:

| Also, another thing that gets requested is a way to turn off warnings.
| 
|   For example, I often don't want
|     octave:2> inv(zeros(2))
| --> warning: inverse: matrix singular to machine precision, rcond = 0
| 
| So my questions is how these warnings may relate to a possible
| variable to control issued warnings?

You can do that now if you don't mind turning off all warnings:

  octave:3> warning ("off")
  ans = backtrace
  octave:4> inverse (zeros (2))
  ans =

     0   0
     0  -0

So far, we only have a few variables that control some common
warnings.  Maybe we need a better way of registering them so they can
be controlled without having to add individual variables for each one.
The mechanism would need to work for warnings that are found .m files
too.  Matlab apparently already has this by allowing

  warning ('message_id', 'message');

to register 'message_id' string with the warning handler so individial
warnings can be turned off using the message id:

  warning ('off', 'message_id')

Implementing this will require a bit of work, but it should not be too
difficult.  If we do it, then perhaps we should then eliminate all the
individual warn_* variables.

jwe



reply via email to

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