octave-maintainers
[Top][All Lists]
Advanced

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

Function handles for nonexisting functions


From: Moritz Borgmann
Subject: Function handles for nonexisting functions
Date: Sun, 4 May 2008 18:59:41 +0200

In Matlab, I can create function handles to nonexisting functions using str2func or the @ operator. Only when I try to call the function, an error like the following occurs:

??? Undefined function or method 'blabla' for input arguments of type 'double'.

In Octave, it seems that existance of the function is checked already upon creation of the function handle. This means that the str2func or @ call can fail with something like

error: error creating function handle "@blabla"

which would not happen in Matlab.

Now I'm not certain how important this difference in behavior is, how much of a conscious design decision was behind the Octave implementation, and how much effort it would be to change. To avoid subtle failure when porting code, I'd have a slight preference for making the behavior compatible. What's the general opinion on this?

-M


reply via email to

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