octave-maintainers
[Top][All Lists]
Advanced

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

Re: [OctDev] warn_* built-in variables


From: David Bateman
Subject: Re: [OctDev] warn_* built-in variables
Date: Tue, 02 May 2006 22:21:31 +0200
User-agent: Thunderbird 1.5 (Windows/20051201)

John W. Eaton wrote:
I just checked in a largeish change that eliminates all warn_*
built-in variables.  Here is the NEWS file entry I wrote for this
change:

  * Previous versions of Octave had a number of built-in variables to
    control warnings (for example, warn_divide_by_zero).  These
    variables have been replaced by warning identifiers that are used
    with the warning function to control the state of warnings.  Now,
    instead of writing

      warn_divide_by_zero = false;

    to disable divide-by-zero warnings, you should write

      warning ("off", "Octave:divide-by-zero");

    You may use the same technique in your own code to control
    warnings.  For example, you can use

      warning ("My-package:phase-of-the-moon",
               "the phase of the moon could cause trouble today");

    to allow users to control this warning using the
    "My-package:phase-of-the-moon" warning identifier.

    You may also enable or disable all warnings, or turn them into
    errors:

      warning ("on", "all");
      warning ("off", "all");
      warning ("error", "Octave:divide-by-zero");
      warning ("error", "all");

    You can query the state of current warnings using

      warning ("query", ID)
      warning ("query")

    (only those warning IDs which have been explicitly set are
    returned).

    A partial list and description of warning identifiers is available
    using

      help warning_ids


The following patch will also adapt Octave Forge to this change and
also removes some old #ifdef cruft.
Want it applied?

BTW, when I updated my copy of Octave Forge, it did not include the
recent changes I posted to handle changes in the structure of the
octave_value classes.  Am I missing something?  Should I be using CVS
HEAD or a branch to get the latest Octave Forge sources that are
intended to work with the Octave CVS sources?
You have to work against the developer CVS with SSH, as the public CVS is not being synchronized to the developer CVS till the new sourceforge hardware comes on line.

Thanks,

jwe



reply via email to

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