![]() Chapter Contents |
![]() Previous |
![]() Next |
| GETITEMC, GETITEML, GETITEMN, and GETITEMO |
| Category: | List |
| Syntax | |
| Details | |
| Examples | |
| Example 1: Using the GETITEMC Function | |
| Example 2: Using the GETITEML Function | |
| Example 3: Using the GETITEMN Function | |
| Example 4: Using the GETITEMO Function | |
| See Also | |
Syntax |
| cval=GETITEMC(list-id<,index>); |
| sublist-id=GETITEML(list-id<,index>); |
| nval=GETITEMN(list-id<,index>); |
| object-id=GETITEMO(list-id<,index>); |
Type: Character
Type: Numeric
Type: Numeric
Type: Numeric
Type: Numeric or List
Type: Numeric
| Details |
An error results if you use any of these functions to return an indexed item that has a different data type. You can determine the data type of an item in a list by using ITEMTYPE before using GETITEMC, GETITEML, GETITEMN, or GETITEMO.
| Examples |
Return the character values stored in the first and third items of the list identified by the MYLIST variable:
citem=getitemc(mylist); citem=getitemc(mylist,3);
Return the list identifier stored in the eighth item of the list identified by the MYLIST variable:
slist=getiteml(mylist,8);
Return the numeric value stored in the fifth item of the list identified by the MYLIST variable:
nitem=getitemn(mylist,5);
Return the object identifiers stored in the third and ninth item of the list identified by the MYLIST variable:
sublist=getitemo(mylist,3); oitem=getitemo(mylist,9);
| See Also |
GETNITEMC, GETNITEML, GETNITEMN, and GETNITEMO
SETITEMC, SETITEML, SETITEMN, and SETITEMO
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.