Oma_Ot_Table_Cell_Nth_Value_Get()
摘要
获取表中指定单元格的按索引存取的值。
语法
Oma_Ot_Table_Cell_Nth_Value_Get (ot_table_ptr, row, column, value_index, value_reference)
| 参数 | 类型 | 说明 |
|---|---|---|
ot_table_ptr |
OmaT_Ot_Table * |
所关注的 OT 表。 |
row |
int |
包含所关注单元格的行的索引。 |
column |
int |
包含所关注单元格的列的索引。 |
value_index |
int |
单元格内所需值的索引。索引 0 对应多值单元格中的第一个值,以及单值单元格中唯一的值。 |
value_reference |
void * |
用于存放所请求值引用的内存(必须为 int *、double * 或 char **)。 |
返回类型
PrgT_Compcode
若指定的值不存在,或尚未加载到部分表(partial table)中,则返回 PrgC_Compcode_Failure;否则返回 PrgC_Compcode_Success。
头文件
oma_ot.h
详情
value_reference 参数的类型由模板中指定的类型决定。若被引用值的类型为 char *,则该字符串的内存由本函数分配,并应使用 prg_mem_free() 释放。