wvh_is_scalar
Tests if a PV‑WAVE variable is a scalar (not an array).
C Usage
long wvh_is_scalar(wvh)
WVH wvh;
FORTRAN Usage
INTEGER*4 LF_WVH_IS_SCALAR(l_wvh)
INTEGER*4 l_wvh
64-bit UNIX FORTRAN Usage
INTEGER*8 LF_WVH_IS_SCALAR(l_wvh)
INTEGER*8 l_wvh
Input Parameters
wvh—The Wave variable handle of the variable.
Returned Values
Returns 1 if the variable is a scalar. Returns 0 if the variable is not a scalar and returns –1 if wvh is not a valid Wave variable handle.
For scalar structures, this function returns 1 (TRUE) while wvh_dimensions does not return 0. This is because internally PV‑WAVE stores structure-type variables in an array even if the variable is a scalar (1 element). So, if you want to know if a structure- type variable is a scalar (1 element) or an array of type structure, use this function rather than wvh_dimensions. If you use wvh_dimensions and it returns 1, you need to look at the dims[] array to determine if it is a scalar variable or an array of type structure.
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.