Language Reference
LISTDELETENAME Call
CALL LISTDELETENAME (list, position ) ;
This subroutine is supported by the IML procedure and the iml action.
The ListDeleteName subroutine removes the names of one or more items, but the items themselves are not removed. For examples and a general discussion of using lists, see Chapter 9, Lists and Data Structures.
The subroutine takes the following arguments:
- list
specifies an existing list.
- position
specifies a numeric matrix of indices or a character matrix of item names. Names are not case sensitive.
The first of the following statements creates a list that has four items. The call to the ListDeleteName subroutine deletes the names for the first and third items. After the deletion, the ListGetName function returns a four-element vector that has one nonmissing name and three missing values (blank strings), as shown in Figure 225.
L = [ #"Hire Date"={"01JUL1996"d "15JUN1997"d},
#Name={"John" "Fred"},
#Salary={72000 60000},
#"Job Title"={"Manager" "Programmer"} ];
call ListDeleteName(L, {1 3}); /* delete 1st and 3rd names */
names = ListGetName(L);
print names;
Figure 225: Names of Items in a List
| names | |||
|---|---|---|---|
| Name | Job Title | ||