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: Thu, 28 Oct 2010 07:19:04 +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)

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

                 Summary: anonymous functions don't see functions in private/
                 Project: GNU Octave
            Submitted by: i7tiol
            Submitted on: Thu 28 Oct 2010 07:19:03 AM GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Other
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

In the following example, function 'private_test' is in the current
directory, and function 'test_private' is an arbitrary function in the
subdirectory private/ of the current directory.

function private_test ()

  f = @ () test_private ();

  f ();

endfunction

octave:1> private_test ()
error: `test_private' undefined near line 3 column 12
error: called from:
error:    at line -1, column -1
error:   /home/olaf/tp/tp/inst/private_test.m at line 5, column 3
octave:1> 

One can workaround by setting a handle to test_private:

function private_test ()

  test_private = @ test_private;

  f = @ () test_private ();

  f ();

endfunction

octave:1> private_test ()
octave:2> 





    _______________________________________________________

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]