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

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

[Octave-bug-tracker] [bug #48064] for-loop over structure elements behav


From: anonymous
Subject: [Octave-bug-tracker] [bug #48064] for-loop over structure elements behaves differently from document
Date: Thu, 2 Jun 2016 23:08:52 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.8.0

Follow-up Comment #5, bug #48064 (project octave):

For other types of "x", such as a cell or an ordinary matrix of
double,int*,char,logical,...,  all of "for val=x", "for [val]=x" and "for
[~]=x" iterate over x(:,1),x(:,2),...
Therefore, for a struct "x", all of the above for-loop should also iterate on
x(:,1),x(:,2),... consistently.
Only "for [val,key]=x", "for [~,key]=x", "for [val,~]=x" and "for [~,~]=x"
should iterate over x.a,x.b,...

So the current behavior does not need to change.
Only the document should be changed.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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