TU-Berlin → Inst. f. Mathematik → Algebra und Zahlentheorie → KASH → Documentation → Reference Manual
KASH3 Reference Manual
search    

Function

Position ( list L, any a ) -> elt-ord^rat

Optional Arguments

Startelt-ord^rat (Default: 1) Determines the position where the search is started.
FailanyDetermines what to return in case of failure.

Description

Return the position of the first occurence of `a' in `L' if `a in L' is true, and FAILURE otherwise.

Examples

L:=[1,,3,4]; Position(L,3); Position(L,1,rec(Start:=2)); Position(L,"foo");
Built: Mon Nov 14 21:12:39 UTC 2005 on mack
The KANT Group