|
|
|
Delete one or more items
Added on 6/29/1999
|
deleteListItem(list, itemToDelete, deleteAll)list is the list to have items deleted from itemToDelete is the item to be deleted from the list
deleteAll is a flag which can be true or false if deleteAll is true, all occurrences of itemToDelete will be removed from the list.
--Copyright © 1997 -1998 Metaforce Interactive.
--http://www.metaforce.com
on deleteListItem list,itemToDelete,deleteAll
set numItems = count(list)
repeat with i = 1 to numItems
if itemToDelete = getAt(list,i) then
deleteAt(list,i)
if deleteAll then
set numItems to numItems - 1
set i to i - 1
next repeat
else
exit repeat
end if
end if
end repeat
end
|
|