Connected: An Internet Encyclopedia
3.12 Fixed-length Array

Up: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 1832
Up: 3. XDR DATA TYPES
Prev: 3.11 String
Next: 3.13 Variable-length Array

3.12 Fixed-length Array

3.12 Fixed-length Array

Declarations for fixed-length arrays of homogeneous elements are in the following form:

         type-name identifier[n];

Fixed-length arrays of elements numbered 0 through n-1 are encoded by individually encoding the elements of the array in their natural order, 0 through n-1. Each element's size is a multiple of four bytes. Though all elements are of the same type, the elements may have different sizes. For example, in a fixed-length array of strings, all elements are of type "string", yet each element will vary in its length.

         +---+---+---+---+---+---+---+---+...+---+---+---+---+
         |   element 0   |   element 1   |...|  element n-1  |
         +---+---+---+---+---+---+---+---+...+---+---+---+---+
         |<--------------------n elements------------------->|

                                               FIXED-LENGTH ARRAY


Next: 3.13 Variable-length Array

Connected: An Internet Encyclopedia
3.12 Fixed-length Array