indexof - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

MapleTA[Builtin]

  

indexof

  

returns the index of an item in a sequence

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

indexof(k, a, b, c, d, ... )

Parameters

k

-

anything

a, b, c, d, ...

-

anything

Description

• 

The indexof command returns the index of an item within the remaining sequence of arguments. The first item is in position 0, the second in position 1, and so on.

• 

If k does not match any other item then -1 is returned.

Examples

MapleTA:-Builtin:-indexof3,2,3,5,7,11

1

(1)

MapleTA:-Builtin:-indexof2,2,3,5,7,11

0

(2)

MapleTA:-Builtin:-indexof99,2,3,5,7,11

−1

(3)

Compatibility

• 

The MapleTA[Builtin][indexof] command was introduced in Maple 18.

• 

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

See Also

list

MapleTA

member

 


Download Help Document