next up previous
Next: Record Descriptions Up: Unofficial Format of IDL Previous: Record Types


Having defined the general properties of records in an IDL save file, we will now proceed to a finer level of detail: the definition of primitive data types within the records themselves.

The most important data types are long integers and strings, referred to throughout this document as LONG and STRING. These quantities are naturally quite the same as the LONG and STRING data types found within IDL, but because in this document they represent names of data types as stored on disk, it is required to define their exact layout. The library procedures CMSV_RRAW and CMSV_WRAW are used to read and write these types of data values.

Please NOTE: the formats of quantities stored in IDL variables can be somewhat different than these raw quantities. This section only refers to how the fundamental units of the file are formatted. See Sec. 9 for the format of IDL variable data.

The integer types are stored in IEEE format, and are automatically converted by the CMSV_RRAW and CMSV_WRAW procedures. Note that every integer value is encoded according the following table, including those within record headers, and stored in string length values.

Format: INTEGER_TYPES        (list of integer data types)
Type Name Description
BYTE BYTE Single native byte
BYTE$\times$4 LONG 32-bit signed word, IEEE format
BYTE$\times$8 ULONG64 64-bit unsigned word, IEEE format

The string type is another fundamental type. A string contains any variable-length stream of bytes. The first quantity is a LONG integer which describes the length of the string in bytes, followed by the bytes themselves.

Format: STRING        (format of string data type)
Type Name Description
LONG LENGTH Length of the string in bytes
BYTE$\times$LENGTH CHARS Characters of string, expressed as bytes. If the string is empty, i.e., if LENGTH is zero, then no CHARS are present. There is no zero termination.
BYTE$\times$N PAD Padding bytes, to align stream to next 32-bit boundary. If the stream is already on a 32-bit boundary, or if LENGTH is zero, then no PAD bytes appear.

Thus, an empty (zero-length) string would simply be composed of a single LONG integer with the value of zero.

next up previous
Next: Record Descriptions Up: Unofficial Format of IDL Previous: Record Types
Craig Markwardt 2011-12-21