[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to tell a function from a string
From: |
John W. Eaton |
Subject: |
Re: How to tell a function from a string |
Date: |
Tue, 20 Jan 1998 03:10:58 -0600 |
On 20-Jan-1998, Lorenzo M. Catucci <address@hidden> wrote:
| 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?
If you mean why haven't I written it, probably because I never needed
it and I don't recall anyone else ever complaining that it was missing.
jwe