illegal use of an object as a name - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Error Message Guide : illegal use of an object as a name

Error, illegal use of an object as a name

 

Description

Examples

Description

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.

Examples

Example 1

a,b5,6

Error, illegal use of an object as a name

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,b5,6

a,b5,6

(2.1)

Example 2

seqI2,I=1..5

Error, illegal use of an object as a name

I2

Error, illegal use of an object as a name

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.

seqi2,i=1..5

1,4,9,16,25

(2.2)

J2

J2

(2.3)

Example 3

myProcedureprocnevaln n2 end proc

myProcedureprocn::evalnn^2end proc

(2.4)

myProcedure3

Error, illegal use of an object as a name

In this procedure, the evaln modifier expects a parameter that evaluates to a name.

Solution: Call the myProcedure with a parameter that is assignable.

N3

N3

(2.5)

myProcedureN

N2

(2.6)

See Also

argument processing

assignment

evaln

I

name

parameter modifiers

type/assignable