Obtain argument values

To obtain the argument value with a C UDR, access the parameter that you have specified in the C declaration of the function. The parameter declaration indicates the appropriate passing mechanism for the UDR parameters.

You can access the argument values through these declarations, as you would any other C-function parameter, as follows:
  • For pass-by-reference parameters, access the argument value through its pointer. Do not modify this pointer within the body of the UDR.

    Most data types are passed by reference. The sample UDR bigger_double(), in Passing arguments by reference, shows how to access pass-by-reference arguments within a UDR.

  • For pass-by-value parameters, you can access the argument value directly through its parameter variable.

    For a list of data types that can be returned by value, see Types of values that fit in an MI_DATUM structure (Passed by value). The sample UDR bigger_int(), in Passing arguments by value, shows how to access pass-by-value arguments within a UDR.

Tip: You can obtain information about an argument, such as its type and length, from the MI_FPARAM structure. For more information, see Check routine arguments.