ecl-logo Documentation

OptionDefaults

OptionDefaults[function]defaultRules

returns the default values for the Options of function.

OptionDefaults[function,options]defaultRules

returns the default values for the Options of function, where the values in options take precedence over defaults.

Details

  • Options which are explicitly specified that do not match the expected patterns will be defaulted.
  • Option names are always strings.
  • Input
    Output

Examples

Basic Examples  (4)

Default Options are pulled from OptionDefinition[symbol]:

Options specified in input take precedence over defaults:

Returns empty list for functions without Usage rules:

Returns options with string keys for built in functions:

Additional Examples  (1)

Retrieve default options for built in function as string keys:

Messages  (2)

Pattern  (1)

Throws a message for options which are specified and don't match their patterns, returns their default values:

UnknownOption  (1)

Throws a message and filters out options which are specified and are not defined for the function: