SAS Component Language Dictionary |
Reverses the order of the items in an SCL list
list-id=REVLIST(list-id);
|
-
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.
Type: Numeric or
List
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.
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));
HASATTR
ROTLIST
SETLATTR
SORTLIST
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.