SAS Component Language Dictionary |
Category: | List |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
list-id=REVLIST(list-id); |
is the identifier of the list to reverse. The function returns the list identifier that is passed in. An invalid list-id produces an error condition.
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 |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.