listgetelt/3—retrieve a list element located at a specified position  within a list


The listgetelt/3 function retrieves a list element located at a specified position within a list. The syntax for this function is as follows:

listgetelt($LIST,$POS,$ELEM)
$ELEM=listgetelt($LIST,$POS)

listgetelt/3 arguments

Argument

Mode

Type

Description

$LIST

Input

LIST_OF ANY

Specifies the list from which the element in the specified location is to be retrieved

$POS

Input

INTEGER

Specifies of the position of requested element

$ELEM

Output

ANY

Element at the specified position in list

Use the listgetelt/3 function to retrieve the element at position $POS in list $LIST and return it into $ELEM.

The first element in the list is numbered as 1.

listgetelt/3 example

$BAD_SLOT2=listgetelt($E.mc_bad_slot_names,2);

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*