pathdef, savepath, ocaverc and Matlab

Ben Abbott bpabbott at mac.com
Thu Jan 3 22:04:51 CST 2008


On Jan 4, 2008, at 11:31 AM, John W. Eaton wrote:

> On  4-Jan-2008, Ben Abbott wrote:
>
> | Can you or another tell me how I can get to the list of registered
> | functions?
>
> You can't, at least not from the scripting language.
>
> | While it apprears to me that this should be done in c++, I'm not a  
> c/c+
> | + programmer, and so I'm hoping to do this by adding a few lines to
> | ".../startup/octaverc".
>
> I think doing it in the scripting language makes sense.
>
> | For that to be viable, I need to have access to
> | "octave_atexit_functions".
>
> Why?  Can't you just create a new function, say __finish__.m (could
> place it in the startup directory for now) like this:
>
>  function __finish__ ()
>    if (exist ("finish") == 2)
>      ## No arg list here since finish might be a script.
>      finish;
>    endif
>  endfunction
>
> and then add
>
>  atexit ("__finish__");
>
> to the system octaverc file?  Should we also allow finish to be
> implemented as a .oct or .mex file?
>
> jwe

Perfect!

Thanks for the suggestion.

Ben


More information about the Octave-maintainers mailing list