Maptitude GISDK Help

ArrayLength()

Summary

Computes the number of elements in an array.

 

Syntax

len = ArrayLength(array input_array)

 

Argument

Contents

input_array

Any array

 

Returns

An integer containing the number of elements in the array.

 

Notes

Example

// Two ways to get the length of an array...

x = {"Fred", 243.5, {1, 2, 3}, "Last Item"}

l1 = ArrayLength(x)          // l1 is equal to 4

l2 = x.length               // l2 is equal to 4, too

 

// Here's a very common type of loop

maps = GetMapNames()

for i = 1 to ArrayLength(maps) do          // or, for i = 1 to maps.length

     // do something to the map...

     end

 

Error Codes

Error Type

Meaning

Error

The argument is not an array

 

See Also

Function

Summary

ArrayPosition()

Finds the position of a sub-array in an array

Subarray()

Extracts a number of elements from an array

 

 

©2025 Caliper Corporation www.caliper.com