Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Patterns >

Default

Default[f]
gives the default value for arguments of the function f obtained with a _. pattern object.
Default[f, i]
gives the default value to use when _. appears as the i^(th) argument of f.
Default[f, i, n]
gives the default value for the i^(th) argument out of a total of n arguments.
Default[f, ...]=val
defines default values for arguments of f.
  • _. represents an optional argument to a function, with a default value specified by Default.
  • The necessary values for Default[f] must always be defined before _. is used as an argument of f.
  • Values defined for Default[f] are stored in DefaultValues[f].
New in 1
© 2013 Wolfram Research, Inc. Japanese
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team