data padding issue? [message #10135] |
Thu, 16 October 1997 00:00 |
jyli
Messages: 21 Registered: November 1995
|
Junior Member |
|
|
In the Building IDL Application: P49 - 50
"All instances of structures contain an even number of bytes. On
machines whose native C compilers force short integers to begin
on an even byte boundary, IDL begins fields that are not of type
byte on an even byte boundary. Thus, a padding may appear (when
using ASSOC for I/O) after a byte field to cause the following
non-byte-type field to begin on an even byte."
Suppose my raw data record is 3 bytes long, no padding and pure
clean. I want to use structure {raw, t1:1b, t2:1} and read by
ASSOC. Because of the padding, the structure ocooupies 4 bytes.
Will that cause a problem, I mean reading a four bytes object
from 3 byte record ???
thanks,
------------------------------------------------------------ ------------
Jason Y. Li | Tel : (301) 286-1029
Code 913 | Fax : (301) 286-1759
NASA Goddard Space Flight Center | www : http://climate.gsfc.nasa.gov
Greenbelt, MD 20771, USA | email: jyli@climate.gsfc.nasa.gov
------------------------------------------------------------ ------------
Beauty of style, harmony, grace and good rhythm depend on simplicity.
|
|
|