|
SOLUTIONS
|
Search for all pages containing Rule
BUILT-IN MATHEMATICA SYMBOL
Rule 
or ![]()
represents a rule that transforms lhs to rhs.
DetailsDetails
- The character
can be entered as Esc->Esc or \[Rule].
evaluates rhs immediately. - You can apply rules using Replace.
- The assignment
specifies that the rule
should be used whenever it applies. - In StandardForm, Rule is printed using
. - Symbols that occur as pattern names in lhs are treated as local to the rule. This is true when the symbols appear on the right-hand side of
conditions in lhs, and when the symbols appear anywhere in rhs, even inside other scoping constructs. - Rule constructs can be nested in any way. Rule is treated as a scoping construct, so that inner variables are renamed if necessary.
ExamplesExamplesopen allclose all
Basic Examples (1)Basic Examples (1)
Use a rule that replaces
by 3:
| In[1]:= |
| Out[1]= |
New in 1 | Last modified in 3
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
