Chapter Contents

Previous

Next
SAS Component Language: Reference

Accessing Items Relative to the End of a 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.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.