mi_integer mi_fp_argprec(fparam_ptr, arg_pos)
MI_FPARAM *fparam_ptr;
mi_integer arg_pos;
The mi_fp_argprec( ) function obtains the precision of the routine argument at position arg_pos from the MI_FPARAM structure that fparam_ptr references. The precision is an attribute of the data type that represents the total number of digits the routine argument can hold, as follows.
If you call mi_fp_argprec( ) on some other data type, the function returns zero (0).
The MI_FPARAM structure stores information about the precision of routine arguments in the zero-based argument-precision array. To obtain information about the nth argument, use an arg_pos value of n-1. For example, the following call to mi_fp_argprec( ) obtains the precision for the third argument of the my_func( ) UDR, with which fparam1 is associated:
mi_integer my_func(..., fparam1) ... MI_FPARAM *fparam1; { mi_integer arg_prec; ... arg_prec = mi_fp_argprec(fparam1, 2);
See also the descriptions of mi_fp_argisnull( ), mi_fp_arglen( ), mi_fp_argscale( ), mi_fp_argtype( ), mi_fp_retprec( ), mi_fp_setargprec( ), and mi_fp_setretprec( ).
For more information about argument information in an MI_FPARAM structure or about the precision of a fixed-point data type, see the IBM Informix: DataBlade API Programmer's Guide.