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

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

[Octave-bug-tracker] [bug #59103] inputname() is incorrect for string-li


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #59103] inputname() is incorrect for string-like numeric inputs such as Inf, NaN, i
Date: Tue, 15 Sep 2020 14:52:48 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #2, bug #59103 (project octave):

Thanks for looking at this, but I don't think you can simply look at the base
workspace.  The Matlab docs for inputname say that it walks up the stack until
it finds a call from Matlab code and gets the variable names corresponding to
the arguments from that stack frame.  It looks like we need to do the same to
achieve compatibility for things like the arrayfun example in the "Tips"
section of the Matlab documentation for inputname.

A related issue is that Octave currently attempts to store a text
representation of the expression passed in the argument list even when it is a
complicated expression.  It's expensive to do that, but I must have assumed
when I first tried to implement inputname that it was necessary.  But looking
at it now, it seems that the only thing that we need to store is the name of
simple identifiers when they appear as arguments and everything else is
ignored.  Is that correct?  If so, then I think the code that creates index
expressions can be made significantly simpler.

Note that the Matlab docs also say that inputname returns an error if it is
called inside an overloaded subsref, subsasgn, subsindex,
numArgumentsFromSubscript, numel, or property set or get method.  What?

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59103>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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