Structure length in IDL [message #5672] |
Fri, 26 January 1996 00:00 |
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 *
************************************************************ *****************
|
|
|