Rule::rhs RuleDelayed::rhs

Details

  • This message is generated when a pattern is encountered on the right-hand side of a rule.
  • This is a warning message about an unusual use of patterns. It does not necessarily indicate an error.
  • A pattern is an expression that matches something other than itself. x_ and p__ are examples of common patterns.
  • Patterns are typically used only on the left-hand sides of rules and assignments.
  • Off[message] switches off the message; On[message] switches it on. For example: Off[Rule::rhs].

Examples

Basic Examples  (1)

A warning message is generated because the pattern p_ is used in an unusual way on the right-hand side of the rule:

This shows a more typical use of a pattern in a rule: