Error, illegal use of an object as a name
Description
Examples
This error occurs when an object that is not a name is used where Maple expects a name. This will occur when you make an assignment (using :=) and the left-hand side is not an assignable object or a sequence of assignable objects. The same issue occurs when you use a nonassignable object as an index variable or in another place where a name is expected.
Example 1
a,b≔5,6
The problem is that the left-hand side is a list. It must be a name or a sequence of names.
Solution: To make multiple assignments, use two assignment statements or put a sequence of names on the left-hand side.
a,b≔5,6
Example 2
seq⁡I2,I=1..5
I≔2
I is used to denote the imaginary unit (−1) in Maple. You cannot assign to this name or use it for an index variable.
Solution: Use a different name.
seq⁡i2,i=1..5
1,4,9,16,25
J≔2
J≔2
Example 3
myProcedure≔procn∷evaln n2 end proc
myProcedure≔procn::evalnn^2end proc
myProcedure3
In this procedure, the evaln modifier expects a parameter that evaluates to a name.
Solution: Call the myProcedure with a parameter that is assignable.
N≔3
N≔3
myProcedureN
N2
See Also
argument processing
assignment
evaln
I
name
parameter modifiers
type/assignable
Download Help Document