Reference Guide > H Routines > HDFGETNT Function
  

HDFGETNT Function
Obtains the HDF number type (i.e., data type) and descriptive number type string for the current HDF Scientific Data Set.
Usage
status = HDFGETNT (type)
Output Parameter
type—HDF Scientific Data Set numeric data type. The range of possible values are defined in HDF_COMMON:
*DFNT_FLOAT32
*DFNT_FLOAT64
*DFNT_INT8
*DFNT_UINT8
*DFNT_INT16
*DFNT_UINT16
*DFNT_INT32
*DFNT_UINT32
Return Value
status—The status of the function call, where:
*SUCCEED (0)—Indicates success.
*FAIL (–1)—Indicates failure.
Keywords
Help—If present and nonzero, lists the usage for this routine.
Name—Returns HDF SDS numeric data type as a string, e.g., “DFNT_FLOAT32”. This is more for human use than programmatic use.
Usage—If present and nonzero, lists the usage for this routine. (Same as the Help keyword.)
Wavecast—Returns a string containing the PV‑WAVE data type cast that is equivalent to an HDF SDS numeric data type. You can use the string in a PV‑WAVE EXECUTE statement to dynamically declare a PV‑WAVE variable for use with HDF. Example value: “FLTARR”.
Wavetype—Returns a string containing the PV‑WAVE data type that is equivalent to a HDF SDS numeric data type. This string can be used to programmatically change the data type of a given PV‑WAVE variable to the type required for HDF. Example value: “FLOAT”.
Discussion
HDFGETNT gets the current HDF Scientific Data Set numeric (data) type in a number of different formats. The primary format, where only type is returned, is a simple numeric value that corresponds to a specific numeric type. Keywords facilitate mapping of this value to strings that are of greater use to the PV‑WAVE programmer. These strings can be used with the PV‑WAVE command EXECUTE to dynamically declare an array for use with an HDF Scientific Data set.
Example
hdf_init
@hdf_common
testfile = !Data_dir + '/storm.hdf'
data = 0
status = HDFGETSDS (testfile, data)
IF (status EQ FAIL) THEN $
   MESSAGE, "HDFGETSDS failed."
 
status = HDFGETNT (type, Name=typename, Wavetype=wavetype)
IF (status EQ FAIL) THEN  $
   MESSAGE, /Continue,'HDFGETNT failed.' $
ELSE MESSAGE, /Continue,'Data type is: ' +   $
   typename + '(' + wavetype + ')'
See Also
EXECUTE, HDFGETRANGE, HDFSETNT
Also refer to DFSDGETNT in the HDF Reference Manual.
For more information on using the HDF interface and the calling sequence for the entire suite of HDF base functions, refer to PV-WAVE HDF Interface.
For a complete list of the HDF convenience routines, refer to Functional Summary of Routines.

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.