[Top][All Lists]

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

Re: Octave compared to Matlab

From: John W. Eaton
Subject: Re: Octave compared to Matlab
Date: Mon, 17 Aug 1998 23:38:00 -0500 (CDT)

On 14-Aug-1998, Mario Storti <address@hidden> wrote:

| (From the Octave manual: File:,  Node: Function Files)
| >    If you know that your own function files will not change while you
| > are running Octave, you can improve performance by setting the variable
| > `ignore_function_time_stamp' to `"all"', so that Octave will ignore the
| > time stamps for all function files.  Setting it to `"system"' gives the
| > default behavior.  If you set it to anything else, Octave will check
| > the time stamps on all function files.
| I never used it. I think that it should be used with care. Perhaps
| inside some construct try-catch-end_try_catch (see the command try). 

Temporarily resetting built-in variables should be done inside
unwind_protect blocks, like this:

  old_value = built_in_variable;
    built_in_variable = "new-value";
    ... code that depends on special built-in variable setting here ...
    built_in_variable = old_value;

This way, the value of the built-in variable will be reset no matter
how control exits the block (normal execution, error, or interrupt).

The problem is that you may have to be careful if you reset a built-in
variable and then call another function, because the functions you
call may not be written so that they will work correctly no matter
what the values of the built-in variables are.

(I originally thought that controlling Octave's behavior with various
built-in variables was a good idea.  Now I'm not so sure...)


reply via email to

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