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: Pascal Dupuis
Subject: [Octave-bug-tracker] [bug #31484] anonymous functions don't see functions in private/
Date: Fri, 29 Oct 2010 08:03:32 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.11) Gecko/20101013 Ubuntu/10.04 (lucid) Firefox/3.6.11

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

I tested your program against Matlab 2009a
------ function private_test.m -------------
function private_test (x)

test_private_handle = @ test_private;

f = @ (x) test_private_handle(x);

f (3);

end
---------------------------------------------
>> test_private
??? Error: File: test_private.m Line: 1 Column: 29
"@" dotted names can be used only within a CLASS block.

Error in ==> test_private>@(x)test_private_handle(x) at 5
f = @ (x) test_private_handle(x);

Error in ==> test_private at 7
f (3);

So, it seems that having some func under a private dir can only be used in a
"class" context.

Regards

Pascal

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message posté via/par Savannah
  http://savannah.gnu.org/




reply via email to

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