accessing struct as struct array rearranges field order

John W. Eaton jwe at bevo.che.wisc.edu
Thu Oct 30 16:32:14 CDT 2008


On 30-Oct-2008, Willem Atsma wrote:

| Not urgent in any way, but it has broken some of my code. 
| 
| When I create a structure with a specific order they are rearranged
| depending on how I access them.
| 
| 
| 	D = struct("c",1,"b",5)
| 	fieldnames(D)		% returns correct order
| 	fieldnames(D(1))		% returns fields in alphabetical order
| 
| I assume orderfields is called somewhere when using subreferences. 

No, that's not it.

| version: 3.0.1
| windoze XP, version from octave-forge

I checked in the following change.  I think it should also apply to
the 3.0.x sources.

jwe


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
Url: https://www-old.cae.wisc.edu/pipermail/bug-octave/attachments/20081030/273d805a/attachment.ksh 


More information about the Bug-octave mailing list