syntax - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Maple Syntax

  

As much as possible, Maple conforms to standard linear expression notation and precedence rules. The syntactic expression operators in Maple are shown below in order of precedence (lowest to highest), where all the operators in a given group have the same precedence.

a || b

string concatenation

 

 

:-

use statement

 

 

::

type based pattern match

 

 

%

the ditto operator

 

 

a &name b

user-definable operator

&name a

unary case

 

 

a !

factorial

 

 

a ^ b

exponentiation

a @@ b

operator exponentiation

 

 

a * b / c...

arithmetic operations

a intersect b

set intersection

a @ b

operator composition

a . b

dot product or matrix multiplication

 

 

a + b - c...

arithmetic operations

+ a

arithmetic operations

- a

arithmetic operations

a union b

set union and difference

a minus b

set union and difference

 

 

a mod b

an expression or value mod another value

 

 

subset

subset operator

 

 

a .. b

a range of values

 

 

a < b

comparison operations

a <= b

comparison operations

a = b

comparison operations

a <> b

comparison operations

a > b

comparison operations

a >= b

comparison operations

 

 

in

tests for set and list membership

 

 

a $ b

$ sequence generator

 

 

not a

logical not

 

 

a and b

logical and

 

 

a or b

logical or

 

 

xor

logical xor

 

 

implies

logical implication

 

 

a -> b

an operator (simple procedure)

 

 

a, b

a sequence of values

 

 

assuming

compute value of expression under assumptions

 

 

:=

assignment statement

 

 

( a )

a parenthesized expression (to control precedence)

' a '

unevaluated expression

{ a, b, ... }

a set

[ a, b, ... ]

a list

%1

labeled expression in the last output

 

 

a [ b ]

indexed object or selection of entries from a data structure

f ( a )

function call

• 

An operator or function can be applied element-wise by using the element-wise syntax--a tilde (~) after the operator or function name. The precedence of element-wise operators matches that of the operator being applied element-wise.

  

Note: The exponentiation operators are defined to be nonassociative. Therefore, a^b^c is invalid in Maple--parentheses must be used. The other operators are left-associative, except logical NOT, which is right-associative.

• 

For information on Maple syntax for linear algebra and matrix computations, see Linear Algebra Syntax Shortcuts.

See Also

operator

quotes