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

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

[Octave-bug-tracker] [bug #59342] [octave forge] (struct) Automatic vari


From: Rik
Subject: [Octave-bug-tracker] [bug #59342] [octave forge] (struct) Automatic variable `argn` has been removed
Date: Mon, 2 Nov 2020 14:58:11 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36

Update of bug #59342 (project octave):

              Item Group:                    None => Unexpected Error or
Warning
                  Status:                    None => Confirmed              

    _______________________________________________________

Follow-up Comment #1:

Direct use of 'argn' isn't recommended.  This is reaching deep in to the
interpreter and private variables may change.  If you still want to use this
code then you will need to replace argn with


__varval__ (".argn.")


but this is still vulnerable to name and syntax changes in the future.  A more
robust, but longer, way might be


C = cell (nargin, 1);
for i = 1:nargin
  C(i) = inputname (i);
endfor


If we felt like it, inputname could be adjusted to accept a range of indices
so you could call


inputname (1:nargin)



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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