Options

Options[symbol] or Options["symbol"]

gives the list of default options assigned to a symbol.

Options[expr]

gives the options explicitly specified in a particular expression such as a graphics object.

Options[stream]

gives options associated with a particular stream.

Options[object]

gives options associated with an external object such as an NotebookObject or CloudObject.

Options[obj,name]

gives the setting for the option name.

Options[obj,{name1,name2,}]

gives a list of the settings for the options namei.

Details

  • Many builtin functions allow you to give additional arguments that specify options with rules of the form name->value.
  • Options[f] gives the list of rules to be used for the options associated with a function f if no explicit rules are given when the function is called.
  • Options always returns a list of transformation rules for option names.
  • You can assign a value to Options[symbol] to redefine all the default option settings for a function.
  • SetOptions[symbol,name->value] can be used to specify individual default options.
  • Values defined for Options[f] are stored with values of Default[f,] in DefaultValues[f].
  • Options["symbol"] will return an empty list if there is no corresponding symbol.
  • You can use Options on InputStream and OutputStream objects. For the two streams "stdout" and "stderr", you can use the short forms Options["stdout"] and Options["stderr"], respectively.
  • If obj is a user interface object such as $FrontEnd, NotebookObject or CellObject, the kernel will send a request to the front end to find the result.
  • Explicit values are found for options associated with cells, even if these options are only set at the style, notebook, or global level.

Examples

open allclose all

Basic Examples  (3)

Get the list of options for the LinearSolve function:

Define the default options of f:

Define f to use the options:

Get the list of options for a CloudObject:

Scope  (1)

Retrieve the Permissions option of a cloud object:

Wolfram Research (1988), Options, Wolfram Language function, https://reference.wolfram.com/language/ref/Options.html (updated 2024).

Text

Wolfram Research (1988), Options, Wolfram Language function, https://reference.wolfram.com/language/ref/Options.html (updated 2024).

CMS

Wolfram Language. 1988. "Options." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/Options.html.

APA

Wolfram Language. (1988). Options. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Options.html

BibTeX

@misc{reference.wolfram_2024_options, author="Wolfram Research", title="{Options}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/Options.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_options, organization={Wolfram Research}, title={Options}, year={2024}, url={https://reference.wolfram.com/language/ref/Options.html}, note=[Accessed: 22-November-2024 ]}