[Back to Interface] [Prev] [Next]

VSfdefine/vsffdef

intn VSfdefine(int32 vdata_id, char *fieldname, int32 data_type, int32 order)

vdata_id IN:

Vdata identifier returned by VSattach

fieldname IN:

Name of the field to be defined

data_type IN:

Data type of the field values

order IN:

Order of the new field

Purpose

Defines a new field for in a vdata.

Return value

Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise.

Description

VSfdefine defines a field with the name specified by the parameter fieldname, of the data type specified by the parameter data_type, of the order specified by the parameter order, and within the vdata identified by the parameter vdata_id.

VSfdefine is only used to define fields in a new vdata; it does not set the format of a vdata. Note that defining a field using VSfdefine does not prepare the storage format of the vdata. Once the fields have been defined, the routine VSsetfields must be used to set the format. VSfdefine may only be used with a new empty vdata. Once there is data in a vdata, definitions of vdata fields may not be modified or deleted.

There are certain field names the HDF library recognizes as predefined. A list of these predefined field types can be found in the HDF User's Guide.

A field is defined by its name (fieldname), its type (data_type) and its order (order). A fieldname is any sequence of characters. By convention, fieldnames are usually a mnemonic, e.g. "PRESSURE". The type of a field specifies whether a field is float, integer, etc. Thus, data_type may be one of the data types listed in Table 1A in Section I of this manual.

The order of a field is the number of components in that field. A field containing the value of a simple variable, such a time or pressure, would have an order of 1. Compound variables have an order greater than 1. For example, a field containing the values associated with a variable for velocity in three dimensions would have an order of 3.

FORTRAN

integer function vsffdef(vdata_id, fieldname, data_type, order)

integer vdata_id, data_type, order

character*(*) fieldname



[Back to Interface] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF Reference Manual - 07/29/98, NCSA HDF Development Group.