[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to tell a function from a string
From: |
Lorenzo M. Catucci |
Subject: |
Re: How to tell a function from a string |
Date: |
Tue, 20 Jan 1998 10:03:25 +0100 (CET) |
On Tue, 20 Jan 1998, John W. Eaton wrote:
> On 17-Jan-1998, Lorenzo M. Catucci <address@hidden> wrote:
>
> Unfortunately, there isn't a good way to do this from Octave, though
> you could probably wrap is_valid function from src/variables.cc in a
> DEFUN easily enough.
>
> In 2.0.x, you can do something like this (from src/lsode.cc):
>
> tree_fvc *lsode_fcn = is_valid_function (args(0), "lsode", 1);
>
> if (! lsode_fcn)
> error ...
>
> In 2.1.x and later the interface will change. You will have to use
> octave_function* instead of tree_fvc*.
>
Now comes another question: does there exist some reason not to have such
a wrapper defined into octave's main?
Yours,
lorenzo