|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
OptionValue
OptionValue[name]
gives the value of name in options matched by OptionsPattern.
OptionValue[f, name]
gives the value of name for options associated with the head f.
OptionValue[f, opts, name]
extracts option values from the explicit list of rules opts.
DetailsDetails
- OptionValue[{opt1->val1, ...}, ...] gives explicit forms for default option values.
- OptionValue[{spec1, spec2, ...}, ...] allows either
or
as specifications of default option values. Each head is treated as the list of rules obtained from Options[fi]. - OptionValue[f, name] uses the match for the first OptionsPattern object that appears as an argument of f.
- OptionValue[name] is equivalent to OptionValue[f, name], where f is the head of the left-hand side of the transformation rule in which OptionValue[name] appears.
- OptionValue[f, name] and OptionValue[name] always first use option values obtained from an explicit match for an OptionsPattern, then use defaults specified by Options[f].
- OptionValue[f, opts, name, Hold] returns the option value with Hold wrapped around it.
- OptionValue[Automatic, Automatic, name, Hold] is equivalent to OptionValue[name], except that the option value is returned with Hold wrapped around it.
New in 6
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
