|
The mi_fp_setretscale() accessor function sets the scale of a return value of a user-defined function in its associated MI_FPARAM structure.
The mi_fp_setretscale() function sets the scale of the function return value at position ret_pos in the MI_FPARAM structure that fparam_ptr references.
The scale is an attribute of the return-value data type. The meaning of the scale depends on the associated data type, as the following table shows.
The MI_FPARAM structure stores information about the scale of function return values in the zero-based return-scale 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_setretscale() sets the scale to 4 for the first return value of the my_func() UDR, with which fparam1 is associated:
Important: C user-defined functions always have only one return value.
Return Values
None.
See the descriptions of the following functions: mi_fp_argscale(), mi_fp_setargscale(), mi_fp_setretlen(), mi_fp_setretprec(), mi_fp_setrettype(), and mi_fp_setreturnisnull().