hasindex - 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 : hasindex

hasindex

test for whether object is indexed by a given object

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

hasindex(A, ind)

Parameters

A

-

indexable or module; expression to check

ind

-

(optional) expression sequence comprising index to be tested

Description

• 

The function hasindex determines if ind is a valid index for the structure A; that is, whether A contains a value corresponding to the key ind.

• 

If A is a table, hasindex tests whether ind is a key in the table.

• 

If A is a module or record, hasindex tests whether ind is an export of the module.

• 

If A is an rtable, hasindex tests whether ind is consistent with the dimensions of A. Note that ind may have fewer dimensions than A.

• 

If A is an list, set, or string, hasindex tests whether ind is a nonzero integer whose absolute value does not exceed the length of A.

Examples

Lquick,brown,fox

Lquick,brown,fox

(1)

hasindexL,2

true

(2)

hasindexL,4

false

(3)

MLinearAlgebra:-VandermondeMatrix1,2,3,5

M11111248139271525125

(4)

hasindexM,2,3

true

(5)

hasindexM,3,5

false

(6)

mmodule_exporteend module:

hasindexm,e

true

(7)

hasindexm,f

false

(8)

dsDataSeries32,25,42,labels=X,Y,Z

dsX32Y25Z42

(9)

hasindexds,X

true

(10)

Compatibility

• 

The hasindex command was introduced in Maple 2020.

• 

For more information on Maple 2020 changes, see Updates in Maple 2020.

See Also

has

index

indexing_operator

member