alignment of IDL structures: what's the *real* story? [message #335] |
Mon, 08 June 1992 09:16 |
alans
Messages: 12 Registered: September 1991
|
Junior Member |
|
|
Ok, I thought I had this alignment stuff all figured out here, but now it gets
even worse! I have IDL 2.2.1 running on a sun 4, which loves to have things
longword aligned, I know... However, if I create a structure of structures like
this:
Lines: 29
lw = long (0)
; "simple" is 44 bytes long
simple = { SIMPLE_T, a: lw, b: lw, c: lw, x: lonarr(8) }
; "bigger" should be 104 bytes. but it's 112!
bigger = { BIGGER_T, a: lw, b: lonarr (3), x: simple, y: simple }
IDL> help,/str,a
** Structure BIGGER_T, 4 tags, length=112:
A LONG 0
B LONG Array(3)
X STRUCT -> SIMPLE_T Array(1)
Y STRUCT -> SIMPLE_T Array(1)
IDL> help,/str,a.x
** Structure SIMPLE_T, 4 tags, length=44:
A LONG 0
B LONG 0
C LONG 0
X LONG Array(8)
IDL> print,!version
{ sparc sunos 2.2.1}
So what's the story? Are structures automatically double-aligned? This is
getting *really* horrid...
[ ps: If posting a reply, please email me a copy. ]
--
Alan J.Stein MIT/Lincoln Laboratory alans@ll.mit.edu
|
|
|