Generic Arrays

Generic arrays consist of arbitrary elements.

Generic arrays are handled in much the same way as byte arrays, which handle a subset of generic arrays where the size of the arbitrary elements is 1, and their external descriptions are predetermined. The primitive for generic arrays requires an additional parameter to define the size of the element in the array and to call an XDR subroutine to encode or decode each element in the array.

The XDR library includes the following subroutines for generic arrays:

Item Description
xdr_array Translates between variable-length arrays and their corresponding external representations.
xdr_vector Translates between fixed-length arrays and their corresponding external representations.