Neutral Operators (User-defined Operators)
|
Description
|
|
•
|
A neutral operator symbol is formed by the ampersand character & followed either by a valid Maple name, not containing ?, or by a sequence of one or more special characters. Here, a special character means a non-alphabetic, non-numeric character not equal to _ (the underscore character) and not in the exclusion list below. The two forms may not be mixed.
|
•
|
Excluded from &-names (following the &) are:
|
& | ( ) [ ] { } ; : ' ` # % \ <newline> <blank>
|
|
|
•
|
The following is a list of allowable special characters.
|
~ ! @ $ ^ * - + = " < > , . / ?
|
|
|
•
|
Neutral operators can be any length.
|
•
|
Neutral operators can be used as unary prefix operators, or infix binary operators, or as function calls. They generate function calls, with the name of the function the same as the name of the neutral operator.
|
•
|
With the exception of &*, the neutral operators all have the same precedence. The &* operator has lower strength. For more information about the precedence of neutral operators in relation to other operators, see operators/precedence.
|
•
|
Maple imposes no semantics on the neutral operators. The user may define manipulations on expressions containing such operators via Maple's interface to user-defined procedures for various standard library functions, including simplify, diff, series, evalf, and so on. (See the help descriptions for the appropriate library functions.)
|
|
Note: The neutral operators &*~ and &+~ are currently valid, so use of element-wise &* and &+ requires a space between the neutral operator and the tilde. (For example, (a &* ~ b) is element-wise &*, and (a &*~ b) is a use of the neutral operator &*~.)
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
|
|
Download Help Document
Was this information helpful?