[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fieldnames(foo) vs. for [v k]=foo
From: |
Muhali |
Subject: |
fieldnames(foo) vs. for [v k]=foo |
Date: |
Wed, 5 Aug 2009 17:21:44 -0700 (PDT) |
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?
--
View this message in context:
http://www.nabble.com/fieldnames%28foo%29--vs.--for--v-k-%3Dfoo-tp24838400p24838400.html
Sent from the Octave - General mailing list archive at Nabble.com.
- fieldnames(foo) vs. for [v k]=foo,
Muhali <=