Error, invalid operator parameter name - Maple Programming Help

Home : Support : Online Help : System : Error Message Guide : invalidoperatorparametername

Error, invalid operator parameter name

 Description This error occurs when you create a functional operator incorrectly. The parser expects a symbol, or sequence of symbols in parentheses, as the parameter list (the portion of the functional operator to the left of the arrow). For more information, see Functional Operators. You can use the type command to see if the entry to the left of the arrow is of type symbol.

Examples

Example 1

 > $3\to {x}^{2}$
 
 > $\mathrm{type}\left(3,\mathrm{symbol}\right)$
 ${\mathrm{false}}$ (2.1)

This example did not use a symbol. as the parameter for creating the functional operator.

Solution:

To fix this error, use a symbol instead.

 > $x\to {x}^{2}$
 ${x}{↦}{{x}}^{{2}}$ (2.2)
 > $\mathrm{type}\left(x,\mathrm{symbol}\right)$
 ${\mathrm{true}}$ (2.3)

${\text{}}{\text{}}{\text{}}{\text{}}{\text{}}$

Example 2

 > $\left({x}_{1},y\right)\to {x}_{1}+{y}^{2}$
 
 > $\mathrm{type}\left({x}_{1},\mathrm{symbol}\right)$
 ${\mathrm{false}}$ (2.4)

This example uses a sequence for the parameter list, but not all of the values in the sequence are of type symbol. In particular, using a subscripted name (for example, ${x}_{1}$) within the parameter list is not allowed.

Solution:

To fix this error, ensure that all values within the parameter list are of type symbol.

 > $\left(x,y\right)\to {x}_{1}+{y}^{2}$
 $\left({x}{,}{y}\right){↦}{{x}}_{{1}}{+}{{y}}^{{2}}$ (2.5)
 > $\mathrm{type}\left(x,\mathrm{symbol}\right)$
 ${\mathrm{true}}$ (2.6)

Example 3

In this example, the declaration seems correct, however is not of type symbol.

 > $P\left(t\right)\to {t}^{2}$
 
 > $\mathrm{type}\left(P\left(t\right),\mathrm{symbol}\right)$
 ${\mathrm{false}}$ (2.7)

Solution:

You can define the functional operator $P$ in the following way:

 > $P≔t\to {t}^{2}$
 ${P}{≔}{t}{↦}{{t}}^{{2}}$ (2.8)
 > $P\left(4\right)$
 ${16}$ (2.9)

${\text{}}{\text{}}{\text{}}{\text{}}{\text{}}$