ArrayElementToInteger(), A2I()

Summary

Converts an array element to an integer.

Syntax

int_value = ArrayElementToInteger(array arr, int pos)

Argument Contents
arr An array
pos The position of the array element

Returns

The array element in the position pos if it is of the right type or null if the element is the wrong type or if pos is out of bounds.

Notes

  • Can also be called as A2I().

  • Allows you to access elements in an array when using expressions and formula fields.

Example

// Create a formula field with the number of polygons in each area
CreateExpression(, "NPoly", "A2I(GetArea(ID),1)", )

See Also

Function Summary
ArrayElementToReal() Converts an array element to a real number
ArrayElementToString() Converts an array element to a string
ExtractArray() Returns the specified sub-array, which must itself be an array