void mi_fp_setretprec(fparam_ptr, ret_pos, ret_prec)
MI_FPARAM *fparam_ptr;
mi_integer ret_pos;
mi_integer ret_prec;
Valid in Client LIBMI Application? | Valid in User-Defined Routine? |
---|---|
Yes | Yes |
The mi_fp_setretprec( ) function sets the precision of the function return value at position ret_pos in 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 return value can hold, as follows.
The MI_FPARAM structure stores information about the precision of function return values in the zero-based return-precision array. To set information for the nth return value, use a ret_pos value of n-1.
For example, the following call to mi_fp_setretprec( ) sets the precision of 10 for the first return value of the my_func( ) UDR, with which fparam1 is associated:
mi_integer my_func(..., fparam1) ... MI_FPARAM *fparam1; { ... mi_fp_setretprec(fparam1, 0, 10);
None.
See also the descriptions of mi_fp_argprec( ), mi_fp_setargprec( ), mi_fp_setretlen( ), mi_fp_setretscale( ), mi_fp_setrettype( ), and mi_fp_setreturnisnull( ).
For more information about return-value 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.