MapleTA[Builtin] - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Education : MapleTA Package : Builtin : MapleTA/Builtin/indexof

MapleTA[Builtin]

 indexof
 returns the index of an item in a sequence

 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

 > $\mathrm{MapleTA}:-\mathrm{Builtin}:-\mathrm{indexof}\left(3,2,3,5,7,11\right)$
 ${1}$ (1)
 > $\mathrm{MapleTA}:-\mathrm{Builtin}:-\mathrm{indexof}\left(2,2,3,5,7,11\right)$
 ${0}$ (2)
 > $\mathrm{MapleTA}:-\mathrm{Builtin}:-\mathrm{indexof}\left(99,2,3,5,7,11\right)$
 ${-}{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

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam