Previous Page | Next Page

SCL Lists

Accessing Items Relative to the End of an SCL List

It is also useful for you to be able to access items at or relative to the end of an SCL list. You can use negative indices to index an item from the end of the list. Counting from the end of a list, the last item is at index -1 and the first item is at position -n, where n is the length of the list. Thus, you do not need to subtract indices from n to access items relative to the end of the list. All of the SCL list functions recognize negative indices.

Previous Page | Next Page | Top of Page