Parameter/Result Types
 
 
 

More parameter/result types have been added and the type system has been generalized to allow you to specify pass-by-reference, pass-by-pointer and pass-by-value variations of the appropriate base types. This permits a wider range of interface method signatures in FnPub interfaces, particularly those with '&' reference types typically used for passing back values via parameters. The scripter has been upgraded to support all these new types and pass-by options (see also the MAXScript section here for details).

The type codes, defined in the ParamType2 enum, are arranged in sections with various suffixes signifying the sections. The main section gives the so-called 'base types', such as TYPE_INT, TYPE_FLOAT, and the other sections are variations derived from the base types. The variations are:

<base_type> _BV base type passed by value

<base_type> _BR base type passed by reference, used with & ref params & results

<base_type> _BP base type passed by pointer, used with * pointer params& results

<base_type> _TAB a Tab<> of the base type

<base_type> _TAB_BV a Tab<> of base type, the Tab<> is passed by value

<base_type> _TAB_BR a Tab<> of base type, the Tab<> is passed by reference

Since some base types are naturally passed by value or pointer, and the base Tab<> type is passed by pointer, so not all possible combinations are actually made available. For example, there is no TYPE_INT_BV, since TYPE_INT is already passed by value, and there is no TYPE_STRING_BP since TYPE_STRING is already passed by pointer.