comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: alignment of IDL structures: what's the *real* story?

alignment of IDL structures: what's the *real* story?
type: item
description: 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
creator: alans
date: 1992-06-08T16:16:18-00:00