comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » alignment of IDL structures: what's the *real* story?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
alignment of IDL structures: what's the *real* story? [message #335] Mon, 08 June 1992 09:16
alans is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IMSL/IDL vs IDL (Which is the better)
Next Topic: Re: IMSL/IDL vs IDL (Which is the better)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:43:26 PDT 2025

Total time taken to generate the page: 0.00547 seconds