help-octave
[Top][All Lists]
Advanced

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

Re: load and save in dynamically linked functions


From: John W. Eaton
Subject: Re: load and save in dynamically linked functions
Date: Fri, 28 Nov 2003 14:41:55 -0600

On 27-Nov-2003, Thomas Weber <address@hidden> wrote:

| Can you point me to a file in the source where the C++-interface to eval
| is defined? (I know only C, but I think I can figure it out with the
| code).

In recent versions of Octave, src/parse.y has 3 different feval
functions:

  extern octave_value_list
  feval (const std::string& name,
         const octave_value_list& args = octave_value_list (),
         int nargout = 0);

  extern octave_value_list
  feval (octave_function *fcn,
         const octave_value_list& args = octave_value_list (),
         int nargout = 0);

  extern octave_value_list
  feval (const octave_value_list& args, int nargout = 0);

Use the first if you have the function a string and the argument list
as an octave_value_list object.

Use the second if you have a pointer to an octave_function object
(probably not a good idea to use this outside of the Octave
interpreter itself unless you know precisely what you are doing).

Use the third if all you have is an argument list in an
octave_value_list object, with the first argument containing the name
of the function as a string (this is what Octave's feval function
receives as an argument list, so it calls this function).

jwe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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