Maptitude GISDK Help

ArrayPosition()

Summary

Finds the position of a sub-array in an array.

 

Syntax

position = ArrayPosition(array my_array, array sub_array, array options)

 

Argument

Contents

my_array

The array to be searched

sub_array

The sub-array to locate

 

Option

Type

Contents

Case Sensitive

Boolean

If "True" the comparison is case sensitive, if "False" (the default) the comparison is not case sensitive

 

Returns

An integer indicating the position of the first occurrence of sub_array in my_array, or zero, indicating that sub_array does not appear in my_array.

 

Notes

Example

pos = ArrayPosition({1, 2, 3, 4, 5}, {4, 5}, )

// pos = 4

pos = ArrayPosition({"Fred"}, {"fred"}, {{"Case Sensitive", "True"}})

// pos = 0

pos = ArrayPosition({"Bill", "Fred", "Sam"}, {"Mark"}, )

// pos = 0

 

See Also

Function

Summary

Subarray()

Extracts a number of elements from an array

FindStrings()

Finds strings in an array that match one or more search specs

 

 

©2025 Caliper Corporation www.caliper.com