Unexpected behavior with built-in
John W. Eaton
jwe at octave.org
Thu Jul 9 15:22:50 CDT 2009
On 9-Jul-2009, Joel LeBlanc wrote:
| The current tip (9423:f284e2a26ff9) gives unexpected behavior when I run
| built-in. I am running on OSX (Darwin Kernel Version 9.7.0: Tue Mar 31
| 22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386 i386
| MacBookPro2,2 Darwin).
| Sorry about not having the
| standard debug format, but bug_report gives (octave-bug-3.1.55: command not
| found).
|
| So here is a simple function to replicate my concern:
| ************************
|
| function builtinFailure
|
|
|
| builtin('beep');
|
|
|
| end
|
|
|
| function beep
|
| disp('Calling overloaded load function: Test Failed!');
|
| end
In Octave, beep is not a built-in function. I'm not sure what should
happen here. Should we have builtin only look up built-in functions
(I think that is what Matlab does)?
Or maybe we should have builtin only look up built-in functions and
functions on the default path? But if we do that, then how do we
decide what is the default path?
I'm really not sure what is best here. I lean toward the first
solution, but then it seems likely that we will get complaints that
the list of built-in functions in Octave and Matlab are different.
And I don't really want to have to be compatible at that level, so I
don't expect that situation to change.
jwe
More information about the Bug-octave
mailing list