op_vvec_valid()
Abstract
Determines whether a value vector is valid.
Syntax
op_vvec_valid (vvector)
| Argument | Type | Description |
|---|---|---|
vvector |
Vvec_Vector |
value vector of interest |
Return Type
int
OPC_TRUE if the value vector pointer is valid; OPC_FALSE otherwise.
Example
if (op_vvec_valid (target_vector))
{
sum = 0;
for (i = 0; i < op_vvec_size_get (target_vector); i++)
{
/* get current value. */
op_vvec_value_get (target_vector, i, &val);
sum = sum + val;
}
}
/* sum now contains the summation over the value vector. */
Details
None.
Purpose
Provides a way to determine whether the specified value vector is valid.
Errors
- No errors trapped.
Reference
None.