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

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

[Octave-bug-tracker] [bug #60861] set command doesn't allow mixed prop/v


From: Rik
Subject: [Octave-bug-tracker] [bug #60861] set command doesn't allow mixed prop/value pairs and cell arrays
Date: Sat, 31 Jul 2021 21:35:22 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36

Follow-up Comment #3, bug #60861 (project octave):

It would be fairly easy to implement in Octave code.  Currently, set() is
implemented in C++ (libinterp/corefcn/graphics.cc:12962) and it doesn't look
as easy to do this.  The loop in C++ is first over the possible multiple
graphics handles in argument 1 and then it dispatches to the correct set
method based on whether the additional inputs are cellstrs, a struct, or
string/value pairs.

It is probably possible to reverse this and put the for loop over graphics
handles inside the decode of one of the three cases of the switch statement. 
After that one would need to remove the arguments that were used from args
variable and wrap everything in a while loop.

The read-only special cases of set()


 -- VALUE_LIST = set (H, PROPERTY)
 -- ALL_VALUE_LIST = set (H)


would need to be pulled out entirely and probably put at the top of the
function.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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