## deleteFromStack and deleteAllFromStack

### Syntax:

    deleteFromStack (thisStack, thisElement);

    deleteAllFromStack (thisStack, thisElement);

### Purpose:

These functions remove instances of thisElement from thisStack. The standard SLUDGE equality test is performed on each element of the stack and the value of thisElement - if they are the same, the element is removed from the stack. The deleteFromStack function will stop after finding and removing one match; deleteAllFromStack will remove all instances of thisElement which are found.

### Return value:

The command returns the number of elements removed from the stack.

### See also:

The Multi-Purpose Stack / Array / Queue Type

copyStack

enqueue

dequeue

newStack

popFromStack

pushToStack

SLUDGE and this SLUDGE documentation are copyright Hungry Software and contributors 2000-2012