Chapter Contents |
Previous |
Next |
REVLIST |
Category: | List |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
list-id=REVLIST(list-id); |
Type: Numeric or List
Details |
Any names and attributes that are assigned to list items remain with the items when the items are reversed.
REVLIST does not make a copy of the list before reversing the order of the list items. The list is modified in place. To keep a copy of the original list, use COPYLIST before REVLIST.
An error condition results if the list has the NOUPDATE attribute.
To check attributes, use HASATTR. To change attributes, use SETLATTR.
Example |
Make a nonrecursive copy of the list identified by MYLISTID, reverse the items in the copied list, and assign the new list identifier to the variable REVLISTID:
revlistid = revlist(copylist(mylistid));
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.