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

Home » Public Forums » archive » Structure length in IDL
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
Structure length in IDL [message #5672] Fri, 26 January 1996 00:00
franz is currently offline  franz
Messages: 3
Registered: February 1995
Junior Member
I'm having trouble reading fixed-record binary files into
IDL 3.6 (or 3.0) on an SGI/IRIX workstation. The problem
is that IDL is not computing the correct structure length.
I see nothing in the alignment rules that should give rise
to the following behavior.

** Structure <100af7c0>, 1 tags, length=100, refs=1:
JUNK FLOAT Array(25)


** Structure <100af7c0>, 2 tags, length=104, refs=1:
JUNK DOUBLE Array(12)
JUNK2 FLOAT Array(1)

Can anybody tell me why the first structure is assigned a
correct length of 100, but the second structure is 104 bytes?
It seems that IDL is requiring the record length to be an
integer multiple of the largest base datatype in the structure.

This erroneous length is then used when I try to do
associated reads, with the result being that the first record
is read correctly, but all following records are misalligned.

Is there any way to force the structure length?

Any help would be greatly appreciated.

-- Bryan Franz

************************************************************ *****************
* Bryan Franz e-mail:franz@smoc1.gsfc.nasa.gov *
* General Sciences Corporation voice:(301) 286-4529 *
* SeaWiFS Mission Operations fax:(301) 286-1775 *
* Code 970.2 *
* NASA/Goddard Space Flight Center *
* Greenbelt, MD 20771 *
************************************************************ *****************
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Compiling IDL ... ever likey?
Next Topic: How to draw a line on an image?

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

Current Time: Wed Oct 08 15:52:55 PDT 2025

Total time taken to generate the page: 0.00459 seconds