next up previous
Next: Structures Up: Data Type Descriptor Formats Previous: Simple Scalar Quantities


Arrays

Arrays are an extension of simple data types. In addition to the type code and VARFLAGS field, there is an additional segment called ARRAY_DESC, which describes the structure of the array:


Format: TYPEDESC_ARRAY        (type descriptor for arrays)
Type Name Description
LONG TYPECODE IDL variable type code
LONG VARFLAGS Bit flags for a type descriptor, OR'd as follows:
'02'x System variable
'04'x Array
'10'x Unknown?
'20'x Structure (UNSET for simple array)
ARRAY_DESC -- Array descriptor segment


An array descriptor structure is a fixed-length segment describing the dimensions of the array.


Format: ARRAY_DESC        (array descriptor)
Type Name Description
LONG ARRSTART Indicates start of array descriptor (= 8)
LONG NBYTES_EL Number of bytes per element of the array? (string= 12)
LONG NBYTES Number of bytes in array
LONG NELEMENTS Number of elements in array
LONG NDIMS Number of dimensions in array
LONG$\times$2 -- Unknown (= [0,0])
LONG NMAX Number of stored dimensions (always 8?)
LONG$\times$NMAX DIMS Dimensions of array, padded with 1s to NMAX


NOTES: The ARRAY_DESC descriptor indicates the size of the array in a number of different manners. The total number of elements is given by the NELEMENTS field. The number of dimensions in the array is given by NDIMS. Even if NDIMS is less than 8, the array descriptor always appears to contain NMAX (=8) stored dimensions. The ``unused'' dimensions are padded with values of 1. The fields NBYTES_EL and NBYTES appear to be unused by readers. There is some evidence that setting these fields to values of 0 does not harm the readers' ability to parse the file.


next up previous
Next: Structures Up: Data Type Descriptor Formats Previous: Simple Scalar Quantities
Craig Markwardt 2011-12-21