Previous Page | Next Page

SCL Lists

Referencing SCL List Items by Index Number

List indexing is similar to array indexing. An index I specifies the position of an item in the list. The first item is at index I=1, and the last item is at index I=LISTLEN(mylistid), which is the length of the list. Thus, you can use DO loops to process all items in a list, as shown in the following example:

do i=1 to listlen(mylistid);
   t=itemtype(mylistid,i);
   put 'Item ' i ' is type ' t;
end;

Previous Page | Next Page | Top of Page