|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
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
argument of f.
Default[f, i, n]
gives the default value for the i
argument out of a total of n arguments.
Default[f, ...]=val
defines default values for arguments of f.
ExamplesExamplesopen allclose all
Basic Examples (1)Basic Examples (1)
Define 0 to be the default argument for a function
:
| In[1]:= |
| Out[1]= |
represents an argument that can be omitted:
| In[2]:= |
| Out[2]= |
If the second argument is omitted, the default value of 0 is used instead:
| In[3]:= |
| Out[3]= |
If both arguments are omitted, both are taken to have the default value 0:
| In[4]:= |
| Out[4]= |
New in 1
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
