help-octave
[Top][All Lists]
Advanced

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

fieldnames(foo) vs. for [v k]=foo


From: John W. Eaton
Subject: fieldnames(foo) vs. for [v k]=foo
Date: Wed, 5 Aug 2009 22:19:32 -0400

On  5-Aug-2009, Muhali wrote:

| Setting
| 
| octave> foo.b = pi ; foo.a = pi ;
| 
| one gets
| 
| octave> disp(fieldnames (foo))
| {
|   [1,1] = b
|   [2,1] = a
| }
| 
| but
| 
| octave> for [v k] = foo, disp(k), endfor 
| a
| b
| 
| So `for' uses lexicographic ordering while `fieldnames' uses assignment
| order. Isn't that inconsequent, or at least somewhat confusing?

I checked in the following change.

  http://hg.savannah.gnu.org/hgweb/octave/rev/ca95d991a65a

BTW, it's best to report bugs on the address@hidden list.

Thanks,

jwe


reply via email to

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