Neutral Operators (User-defined Operators) - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Operations : Operators : neutral

Neutral Operators (User-defined Operators)

 

Description

Examples

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

a &* b

a &* b

(1)

ab &+ c

ab &+ c

(2)

`&-`a&comma;b&comma;c&comma;d

&-a&comma;b&comma;c&comma;d

(3)

a &xx ba &xx b

0

(4)

See Also

define

operators/elementwise

operators/precedence

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam