From help-octave-request at bevo dot che dot wisc dot edu Tue Jan 20 03:03:35 1998 Subject: Re: How to tell a function from a string From: "Lorenzo M. Catucci" To: help-octave at bevo dot che dot wisc dot edu 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 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