The mi_fp_argtype() function

The mi_fp_argtype() accessor function obtains the type identifier for the data type of an argument of a user-defined routine from the argument's associated MI_FPARAM structure.

Syntax

MI_TYPEID *mi_fp_argtype(fparam_ptr, arg_pos)
   MI_FPARAM *fparam_ptr;
   mi_integer arg_pos;
fparam_ptr
A pointer to the associated MI_FPARAM structure.
arg_pos
The index position into the argument-type array for the argument whose type identifier you want.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_fp_argtype() function obtains the type identifier (MI_TYPEID) of the routine argument at position arg_pos from the MI_FPARAM structure that fparam_ptr references. The type identifier is an integer value that indicates a particular data type. The MI_FPARAM structure stores information about the type identifiers of routine arguments in the zero-based argument-type array. To obtain information about the nth argument, use an arg_pos value of n-1. For example, the following call to mi_fp_argtype() obtains the type identifier for the third argument of the my_func() UDR, with which fparam1 is associated:
mi_integer my_func(..., fparam1)
   ...
   MI_FPARAM *fparam1;
{
   MI_TYPEID *arg_type;
   ...
   arg_type = mi_fp_argtype(fparam1, 2);

For more information about argument information in an MI_FPARAM structure, see the Informix® DataBlade® API Programmer's Guide.

Return values

An MI_TYPEID pointer
A pointer to the type identifier of the argument at position arg_pos.
NULL
The function was not successful.