Language Reference

LISTGETNAME Function

LISTGETNAME (list <, position> ) ;

This function is supported by the IML procedure and the iml action.

The ListGetName function returns the names of one or more items in a list. For examples and a general discussion of using lists, see Chapter 9, Lists and Data Structures.

The function takes the following arguments:

list

specifies an existing list.

position

specifies a numeric matrix of indices of items in the list.

The function returns a k-element character row vector, where k is the number of elements in the position vector. The character row vector contains a blank string for any specified item that does not have a name.

When called without the position argument, the function returns a character vector that contains the names of all items in the list, as shown in the following example:

L = [ #"Hire Date"={"01JUL1996"d "15JUN1997"d},   /* named list */
      #Name={"John" "Fred"},
      #Salary={72000  60000} ];
call ListAddItem(L, 1:5);                  /* add unnamed item */
names = ListGetName(L);
print names;

Figure 227: Names of Items in a List

names
Hire DateNameSalary 


Last updated: July 20, 2026