Livecode Wiki
Advertisement
Warning.svg Warning

The following topics are only for very skilled livecode programmers, not for beginners. The majority of livecoders doesn't need to know how to code widgets, they can use group.

Syntax

<Needle> ( is not | is ) among the elements of <Target>

Use: com.livecode.array

Determines if an array contains a given element

Examples

use com.livecode.array
variable tArray as Array
variable tIsAmong as Boolean
put "value" into tArray["key"]
put ("value" is among the elements of tArray) into tIsAmong -- tIsAmong is true

Returns true if Needle can be found among the elements of Target. description

Elements are compared using the default comparison for that type. Thus for a string, tString, tString is among the elements of tArray is a case sensitive search.

Advertisement