UNOIDL: [in] and [out] method parameter flag usage?

What do [in] and [out] parameter flags mean?

I’m working with Basic (Star Office Basic and Libre Office Basic) and learning to use the MRI (My Reflection and Introspection) tool to view the Methods of a given target.

Where MRI lists Methods I’m seeing that those which require parameters have either an [in], [out], (or possibly even [inout]) prefixing a parameter’s type. Here is an example display from MRI:

Here’s what I’ve learned so far:

  • The UNOIDL (the Unified Network Objects Interface Definition Language) mentions these as parameter flags, in the “Interface” syntax description:

= “[” in | out | inout “]”
parameter definition begins with the
direction flag which is bound with [
]. Valid flags for the direction are
in ( in parameter), out (out
parameter) or inout (in and out
parameter). The direction follows an
identifier for the parameter type and
an identifier for the parameter name.
More than one parameter definitions
are separated by comma.

  • At the bottom of this page it talks about these flags:

There are also parameter flags. Each
parameter definition begins with one
of the direction flags in, out, or
inout to specify the use of the

in specifies that the parameter will be used as an input parameter

out specifies that the parameter will be used as an output parameter
inout specifies that the parameter will be used as an input and output

These parameter flags do not appear in
the API reference. The fact that a
parameter is an [out] or [inout]
parameter is explained in the method

Unfortunately when I refer to an example IDL reference manual page, it does not explain the [out] flag.

The whole point of UNOIDL was that it provides an interface to any language.

[in], [out], and [inout] defines the nature of each interface parameter.

(Note, interfaces are limited to only “method” calls, with any properties actually being simulated by using get and set method calls.)

Unlike C parameters which are generally inputs (unless they are pointers), or LO Basic parameters which are inputs (unless they are arrays), UNO parameters can be declared as bidirectional. A function can get and return multiple parameters, even the same parameters.

Parameters can be inputs, outputs, or both.

  • [in] parameters can only be read (they are read only).
  • [out] parameters can only be set (returned) but not read, and
  • [inout] parameters can be both read and set.

Also see this reference which is NOT the reference for UNOIDL, but does illustrate one example of a language interface using in/out/inout.