Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

Availability

This routine is available starting with SIL Engine™ 1.0.

Table plus
applyColStyleToCelltrue
heading0
columnTypess,s,s,s
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

arrayGetElement(array, index)

Package

array

...

Alias

getElement(array, index)

Pkg Usage

getElement(

...

array, index)

Description

Excerpt
hiddentrue
Returns the element at the specified index.

Returns the element at the specified index.

...

Alias

getElement(array, index)

...

Parameters

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

array

...

Array

Yes

Array where the element at the specified index is searched.

index

...

Number

Yes

Index of the element to be returned.

...

Return Type

Element of the array type.

Example

Code Block
for(number i = 0; i < size(watchers); i = i + 1){
    print(getElement(watchers, i) + " is watching this issue.");
}

Prints all the elements of the array watchers.

...

Note

  1. If index is not number or has negative value the routine returns error.
  2. If index is greater than the size of the array, the routine will return an empty value of the respective type.

Info

SIL Engine™ 2.5 specific

Starting with version 2.5 we added the indexing operator. It will work on arrays, strings, dates and interval.

You can simply write in your programs watchers[0] to refer to the first element in the watchers array.

See also

Filter by label (Content by label)
showLabelsfalse
max

...

25
showSpacefalse
cqllabel = "array_routines" and space = currentSpace ( )
labelsarray_routines