Lingo Dictionary > D-F > findPos

 

findPos

Syntax

list.findPos(property)
findPos(list, property)

Description

List command; identifies the position of the property specified by property in the property list specified by list.

Using findPos with linear lists returns a bogus number if the value of property is a number and a script error if the value of property is a string.

The findPos command performs the same function as the findPosNear command, except that findPos is VOID when the specified property is not in the list.

Example

This statement identifies the position of the property c in the list Answers, which consists of [#a:10, #b:12, #c:15, #d:22]:

Answers.findPos(#c)

The result is 3, because c is the third property in the list.

See also

findPosNear, sort