XLL+ Class Library

Optional arguments

An argument can be marked as optional in one of two ways:

  1. Clicking on or off the Optional argument tool-button, on the Arguments toolbar
  2. Setting the Optional check-box in the General tab of the Arguments Window.

An optional argument can have a default value assigned, using the Default value field in the General tab of the Arguments Window. If the field is left empty, then a standard default value will be used (i.e. zero, an empty string or an empty array).

Default values for arrays

A default value for a vector should be entered with curly braces, like a normal 'C' data array, e.g.:

{ 1.0, 2.3, -5 }
or
{ "cat", "sat", "on", "the", "mat" }
or
{ VALUE_DEFINED_IN_MACRO, global_variable }

It is the responsibility of the programmer to ensure that all the values in the vector are of consistent types and that any non-literals are available to the compiler when the function is built.

See Also

Function Wizard