op_vvec_valid()
摘要
判断一个值向量是否有效。
语法
op_vvec_valid (vvector)
| 参数 | 类型 | 说明 |
|---|---|---|
vvector |
Vvec_Vector |
目标值向量 |
返回类型
int
若值向量指针有效则返回 OPC_TRUE;否则返回 OPC_FALSE。
示例
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. */
详情
无。
用途
提供一种判断指定值向量是否有效的方法。
错误
- 不捕获任何错误。
参考
无。