![]() Chapter Contents |
![]() Previous |
![]() Next |
| HASATTR |
| Category: | List |
| Syntax | |
| Details | |
| Examples | |
| Example 1: Clearing a List That Has a Particular Attribute | |
| Example 2: Determining Whether a List Item Has a Particular Attribute | |
| See Also | |
Syntax |
| rc=HASATTR(list-id,attribute<,index>); |
| 1 | The list or item has the specified attribute. |
| 0 | The list or item does not have the specified attribute. |
Type: Numeric
Type: Numeric or List
'G' |
returns 1 if the list is a global list. |
'L' |
returns 1 if the list is a local list. |
'C' |
returns 1 if the list identifier is also a class identifier. |
'O' |
returns 1 if the list identifier is also an object identifier. |
Type: Character
Type: Numeric
| Details |
If no value is specified for index, HASATTR queries the attribute of the list. If a nonzero value is specified for index, HASATTR queries the attribute of an item in the list.
For a list of attributes for lists and list items, see SETLATTR.
| Examples |
Clear the list identified by MYLIST only if it has the UPDATE attribute:
if hasattr(mylist,'UPDATE') then rc=clearlist
(mylist);
Determine whether the third item in a list has the FIXEDTYPE attribute:
isfixed=hasattr(mylist,'FIXEDTYPE',3);
| See Also |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.