Chapter Contents

Previous

Next
DELITEM

DELITEM



Deletes an item from an SCL list

Category: List


Syntax
Details
See Also

Syntax

list-id=DELITEM(list-id<,index>);

list-id
is the identifier of the list from which the item is to be deleted. The function returns the list identifier that is passed in. An invalid list-id produces an error condition.

Type: Numeric or List

index
is the position of the item in the list. The position can be specified as either a positive or negative number. By default, index is 1 (the first item). If index is a positive number, then the item is at position index from the beginning of the list. If index is a negative number, then the item is at position ABS(index) from the end of the list. An error condition results if the absolute value for index is zero or if it is greater than the number of items in the list.

Type: Numeric


Details

The item to be deleted is specified by its position in the list that is passed in.

DELITEM does not make a copy of the list before deleting the specified item. The delete operation is performed in place on the list, and the list identifier is returned.

When the item to be deleted is a sublist, DELITEM deletes the item but not the sublist, because the sublist may be referenced by other SCL variables or lists.

An error condition results if

To check the attributes of a list or list item, use HASATTR. To change attributes, use SETLATTR.

See Also

DELLIST

DELNITEM

POPC, POPL, POPN, and POPO


Chapter Contents

Previous

Next

Top of Page

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