When an argument has a data type that can fit into an MI_DATUM structure,
the routine manager passes the argument by value. For these pass-by-value
arguments, you declare a parameter as the actual parameter data type
in the C-function declaration.
The following code fragment shows the bigger_int() UDR,
which compares two mi_integer values. Because the routine manager
passes mi_integer values by value, the UDR declares the two
parameters with the mi_integer data type, not as pointers to mi_integer. Figure 1: Passing arguments
by value
mi_integer bigger_int(left, right)
mi_integer left, right;
{
if ( left > right )
return(left);
else
return(right);
}
Any C-language code that calls bigger_int() must also pass
the mi_integer values by value, as in the following sample
call: