octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #31484] anonymous functions don't see function


From: Olaf Till
Subject: [Octave-bug-tracker] [bug #31484] anonymous functions don't see functions in private/
Date: Mon, 01 Nov 2010 08:20:27 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.0.19) Gecko/2010091807 Iceweasel/3.0.6 (Debian-3.0.6-3)

Follow-up Comment #3, bug #31484 (project octave):

Rik has closed the bug due to Pascals comment.

Pascals comment says the the code is not valid for Matlab. This is probably
not true.

1. I don't understand what caused the error-message seen by Pascal with
Matlab 2009a. Anyway, the error-message was seen by running in Matlab the
workaround for the bug, not the code that triggered the bug in Octave.

2. I have tested that the code triggering the bug in Octave is valid input
for Matlab 2009b with the following:

in the current directory, there is the file "private_test.m":

function private_test ()
f = @ () test_private ();
f ();

and in the subdirectory "private" of the current directory there is the file
"test_private.m":

function test_private ()
1;

Running

>> private_test ();

from Matlabs command prompt gives no error-messages (and returns to the
command prompt without output, as expected). (In Octave, this procedure had
triggered the bug.)

BTW even the originally posted workaround works with Matlab-2009b without
error messages for me, provided that the variable name for the anonymous
function is changed since Matlab does not seem to allow using a name for this
which previously named a function (Pascal had done this, I can not see where
his error-message came from).

The bug seems to show that Octaves anonymous functions do not preserve enough
context to see functions in private directories. This might be important to
note, even if the bug should not be fixed immediately.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31484>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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