ecl-logo Documentation

OptionDefinition

OptionDefinition[function]definition

returns the options definition for the function.

Details

  • Each option Association has the following keys:
  • "OptionName" (_String): the name of the option.
  • "Default" (_Hold): the default value of the option wrapped in Hold.
  • "Head" (Rule|RuleDelayed): describes if the option was defined as Rule or RuleDelayed.
  • "Pattern" (_Hold): the pattern the option must match wrapped in Hold (defaults to Hold[_]).
  • "Description" (_String): the description for the option (defaults to "").
  • "Category" (_String): the category the option should be grouped under (defaults to "General").
  • "Symbol" (_Symbol): the symbol the option is defined for.
  • "MapThread" (True|False): whether or not this is a MapThreaded option (defaults to False).
  • Input
    Output

Examples

Basic Examples  (3)

For System` symbols returns association parsed from Options[symbol]:

Query the Options definition for Download:

For a symbol with no options defined, returns an empty list: