The CDF_VARINQ function returns a structure containing information about the specified variable in a Common Data Format file.
Result = CDF_VARINQ( Id, Variable [, /ZVARIABLE] )
The returned structure has the form:
{ IS_ZVAR:0, NAME:"", DATATYPE:"", NUMELEM:0L, $
RECVAR:"", DIMVAR:BYTARR(...) [, DIM:LONARR(...)]}
Note: The DIM field is included in the structure only if IS_ZVAR is one.
The following table provides structure tag information.
Tag |
Description |
This field will contain a 1 if the variable is a zVariable or a 0 if it is an rVariable. |
|
The name of the variable. |
|
A string describing the data type of the variable. The string has the form ‘CDF_XXX’ where XXX is FLOAT, DOUBLE, EPOCH, UCHAR, etc. |
|
The number of elements of the data type at each variable value. This is always 1 except in the case of string type variables (CDF_CHAR, CDF_UCHAR). |
|
A string describing the record variance of the variable. This is either the string ‘VARY’ or ‘NOVARY’. |
|
An array of bytes. The value of each element is zero if there is no variance with that dimension and one if there is variance. For zero-dimensional CDFs, DIMVAR will have one element whose value is zero. |
|
An array of longs. The value of each element corresponds to the dimension of the variable. This field is only included in the structure if the variable is a zVariable. |
The CDF ID, returned from a previous call to CDF_OPEN or CDF_CREATE.
A string containing the name or an integer containing the index of the variable being inquired.
If Variable is a variable ID (as opposed to a variable name) and the variable is a zVariable, set this flag to indicate that the variable ID is a zVariable ID. The default is to assume that Variable is an rVariable ID.
See the example for CDF_VARGET.
Pre 4.0 |
Introduced |