[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automatic execution of user functions when exit octave
From: |
John W. Eaton |
Subject: |
Re: automatic execution of user functions when exit octave |
Date: |
Fri, 26 May 2006 13:57:59 -0400 |
On 26-May-2006, Stefan Mahr wrote:
| Thanks, but I need it within a C++ function. But the following solution
| seems to work:
|
|
| extern std::stack<std::string> octave_atexit_functions;
|
| ...
|
| std::string arg = "somefunction");
| octave_atexit_functions.push(arg);
|
|
| Any comments? Is there a other solution? Maybe it is a good idea to put
| the octave_atexit_functions definition directly to toplev.h
Yes, yes, and no. I think it would be better for you to do
octave_value_list args;
args(0) = "somefunction";
feval ("atexit", args);
rather than manipulating the internal data structures directly.
jwe