arrayGet()

This procedure returns element (character value) for given index.

ParameterTypeDescription
arrayPtrPOINTERMandatoryPointer to array
index9P 0MandatoryIndex of element

This procedure returns element (character value) for given index.

Examples:

xxText = 'Example of text';
xxPtr = stringToArray(%ADDR(xxText): %LEN(%TRIMR(xxText)));
//This will create array with following elements: ['Example','of','text']

xxNum = arrayGetNumOfElements(xxPtr);
//xxNum = 3

xxValue = arrayGet(xxPtr: 2);
//xxValue = 'of'

arrayDestroy(xxPtr);