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

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

[Octave-bug-tracker] [bug #34478] argn is undefined inside subsref


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #34478] argn is undefined inside subsref
Date: Thu, 28 Jul 2016 21:16:03 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

Update of bug #34478 (project octave):

                  Status:                    None => Wont Fix               

    _______________________________________________________

Follow-up Comment #6:

I think the reason that argn is not defined is because when you use the
indexing operators, subsref is called internally on your behalf, you are not
calling it directly. The argument strings that are normally passed in argn
must be stored by the parser when a function is called, and are not available
in this case.

With carandraug's original example code:


>> a = testClass;
>> a.method
error: 'argn' undefined near line 2 column 3
error: called from
    subsref at line 2 column 3


>> subsref (a, ".", "method")
argn =

a       
"."     
"method"

ans = <class testClass>


To work around this the octave_class methods that dispatch to the m-file
functions would have to somehow forward the literal argument strings on to the
m-file function. I don't know that this is worth trying to solve or even
desirable.

This same lack of argument strings would apply to any other class methods that
are not called directly by the user.

Close as won't fix?

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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