check if a name is assigned - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Operations : Assignment : assigned

assigned - check if a name is assigned

Calling Sequence

assigned(n)

Parameters

n

-

name, subscripted name, or function call

Description

• 

The assigned function returns true if n has a value other than its own name, and returns false otherwise.

  

Note: The assigned function returns true if you have placed assumptions on n using the assume command.

• 

This function is one of the exceptions to the normal evaluation rule for arguments of a function. The argument to assigned will only be evaluated as a name (see the evaln function) rather than fully evaluated.

• 

The definition of assigned for array/table subscripts is

assignedAi=evalbAievalnAi

• 

The definition of assigned for function calls is

assignedfx=evalbfxevalnfx

Thread Safety

• 

The assigned command is thread-safe as of Maple 15.

• 

For more information on thread safety, see index/threadsafe.

Examples

a:=tablesymmetric

a:=tablesymmetric,

(1)

a1,2:=x

a1,2:=x

(2)

assigneda1,2

true

(3)

assigneda2,1

true

(4)

assigneda1,1

false

(5)

assignedx

false

(6)

assigned2

true

(7)

f:=x→x2

f:=x→x2

(8)

assignedf

true

(9)

assignedfx

true

(10)

assignedf2

true

(11)

If you place an assumption on a name using the assume command, the assigned command returns true for that name.

assignedb

false

(12)

assumeb,positive

assignedb

true

(13)

Note: Evaluating an assigned call under an assumption (using the assuming command), returns true for a name only if it has a value different from its name.

assignedcassumingc::integer

false

(14)

See Also

anames, assume, assuming, evaln, unames


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