Example 4. Writing a Multi-field and Mixed-type Vdata with Packing

This example illustrates the use of VSfpack/vsfnpak/vsfcpak and VSwrite/vsfwrit
to write a vdata with data of different types. Note that the approach used in
Example 3 makes it difficult for the vdata to have mixed-type data.

In this example, the program creates an HDF file, named
"Packed_Vdata.hdf", then defines a vdata which is named "Mixed Data
Vdata" and belongs to class "General Data Class".  The vdata contains
four order-1 fields, "Temp", "Height", "Speed", and "Ident" of type
float32, int16, float32, and char8, respectively.  The program then packs
the data in fully interlaced mode into a databuf and writes the packed
data to the vdata.  Note that, in the C example, a VSfpack call packs
all N_RECORDS and a VSwrite call writes out all N_RECORDS records.
In the Fortran example, N_RECORDS of each field are packed using separate calls
to vsfnpak and vsfcpak; vsfwrit writes packed data to the vdata. 


