help-octave
[Top][All Lists]
Advanced

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

Re: automatic execution of user functions when exit octave


From: Stefan Mahr
Subject: Re: automatic execution of user functions when exit octave
Date: Fri, 26 May 2006 20:26:07 +0200
User-agent: Thunderbird 1.5 (Windows/20051025)

John W. Eaton:
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



ok, works perfect. thanks a lot



reply via email to

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